Commit 408eee75 by Alexander Makarov

Used full method names when sending email in advanced app

parent e3292c95
...@@ -160,9 +160,9 @@ class SiteController extends Controller ...@@ -160,9 +160,9 @@ class SiteController extends Controller
$user->password_reset_token = Security::generateRandomKey(); $user->password_reset_token = Security::generateRandomKey();
if ($user->save(false)) { if ($user->save(false)) {
return \Yii::$app->mail->compose('passwordResetToken', ['user' => $user]) return \Yii::$app->mail->compose('passwordResetToken', ['user' => $user])
->from([\Yii::$app->params['supportEmail'] => \Yii::$app->name . ' robot']) ->setFrom([\Yii::$app->params['supportEmail'] => \Yii::$app->name . ' robot'])
->to($email) ->setTo($email)
->subject('Password reset for ' . \Yii::$app->name) ->setSubject('Password reset for ' . \Yii::$app->name)
->send(); ->send();
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment