Browse Source

Controllers: Switch password reset to Tx/Mailer due to required auth

master
Riyyi 3 years ago
parent
commit
e782ea5979
  1. 2
      app/classes/Mail.php
  2. 2
      app/controllers/LoginController.php

2
app/classes/Mail.php

@ -42,7 +42,7 @@ class Mail {
return mail($to, $subject, $message, $headers); return mail($to, $subject, $message, $headers);
} }
public static function sendMail(string $subject, string $message, string $from = '', string $to = ''): bool public static function sendMail(string $subject, string $message, string $to = '', string $from = ''): bool
{ {
if ($to == '') { if ($to == '') {
$to = self::$to; $to = self::$to;

2
app/controllers/LoginController.php

@ -151,7 +151,7 @@ class LoginController extends PageController {
<a href='$resetUrl'>$resetUrl</a> <a href='$resetUrl'>$resetUrl</a>
"; ";
if (Mail::send($subject, $message, $user->email)) { if (Mail::sendMail($subject, $message, $user->email)) {
$this->setAlert('success', 'Successfully requested password reset.'); $this->setAlert('success', 'Successfully requested password reset.');
} }
else { else {

Loading…
Cancel
Save