simplify mail creation
This commit is contained in:
@@ -65,9 +65,9 @@ function lostpass_post(App $a)
|
||||
Login Name: %3$s', $resetlink, DI::baseUrl(), $user['nickname']));
|
||||
|
||||
$email = DI::emailer()
|
||||
->newSystemMail((!empty($user['language'])) ? DI::l10n()->withLang($user['language']) : DI::l10n())
|
||||
->newSystemMail()
|
||||
->withMessage(DI::l10n()->t('Password reset requested at %s', $sitename), $preamble, $body)
|
||||
->forUser($user['uid'] ?? 0)
|
||||
->forUser($user)
|
||||
->withRecipient($user['email'])
|
||||
->build();
|
||||
|
||||
@@ -157,9 +157,9 @@ function lostpass_generate_password($user)
|
||||
', DI::baseUrl(), $user['nickname'], $new_password));
|
||||
|
||||
$email = DI::emailer()
|
||||
->newSystemMail((!empty($user['language'])) ? DI::l10n()->withLang($user['language']) : DI::l10n())
|
||||
->newSystemMail()
|
||||
->withMessage(DI::l10n()->t('Your password has been changed at %s', $sitename), $preamble, $body)
|
||||
->forUser($user['uid'] ?? 0)
|
||||
->forUser($user)
|
||||
->withRecipient($user['email'])
|
||||
->build();
|
||||
DI::emailer()->send($email);
|
||||
|
||||
Reference in New Issue
Block a user