MAPG-185 consolidation of email templates
This commit is contained in:
3 files changed
+15
-9
No files matched your search
@@ -328,7 +328,7 @@ class LoginController
|
||||
|
||||
\Container::$dbConnection->commit();
|
||||
|
||||
$this->sendConfirmationEmail($user->getEmail(), $token);
|
||||
$this->sendConfirmationEmail($user->getEmail(), $token, $user->getCreatedDate());
|
||||
|
||||
$this->request->session()->delete('tmp_user_data');
|
||||
|
||||
@@ -551,7 +551,7 @@ class LoginController
|
||||
return new JsonContent(['success' => true]);
|
||||
}
|
||||
|
||||
private function sendConfirmationEmail(string $email, string $token): void
|
||||
private function sendConfirmationEmail(string $email, string $token, DateTime $created): void
|
||||
{
|
||||
$mail = new Mail();
|
||||
$mail->addRecipient($email);
|
||||
@@ -562,6 +562,7 @@ class LoginController
|
||||
\Container::$routeCollection->getRoute('signup.activate')->generateLink(['token' => $token]),
|
||||
'CANCEL_LINK' => $this->request->getBase() . '/' .
|
||||
\Container::$routeCollection->getRoute('signup.cancel')->generateLink(['token' => $token]),
|
||||
'ACTIVATABLE_UNTIL' => (clone $created)->add(new DateInterval('P1D'))->format('Y-m-d H:i T')
|
||||
]);
|
||||
$mail->send();
|
||||
}
|
||||
@@ -578,7 +579,7 @@ class LoginController
|
||||
|
||||
$this->pdm->saveToDb($confirmation);
|
||||
|
||||
$this->sendConfirmationEmail($user->getEmail(), $confirmation->getToken());
|
||||
$this->sendConfirmationEmail($user->getEmail(), $confirmation->getToken(), $user->getCreatedDate());
|
||||
|
||||
return true;
|
||||
}
|
||||
@@ -603,7 +604,7 @@ class LoginController
|
||||
'EMAIL' => $email,
|
||||
'RESET_LINK' => $this->request->getBase() . '/' .
|
||||
\Container::$routeCollection->getRoute('password-reset')->generateLink(['token' => $token]),
|
||||
'EXPIRES' => $expires->format('Y-m-d H:i:s T')
|
||||
'EXPIRES' => $expires->format('Y-m-d H:i T')
|
||||
]);
|
||||
$mail->send();
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user