| Conditions | 2 |
| Paths | 2 |
| Total Lines | 14 |
| Code Lines | 10 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 2 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 45 | public function sendEmail() |
||
| 46 | { |
||
| 47 | |||
| 48 | if ($user = $this->getUser()) { |
||
| 49 | return Yii::$app->mailer->compose([ |
||
| 50 | 'html' => '@modules/users/mail/passwordResetToken-html', |
||
| 51 | 'text' => '@modules/users/mail/passwordResetToken-text' |
||
| 52 | ], ['user' => $user]) |
||
| 53 | ->setFrom([Yii::$app->params['supportEmail'] => Yii::$app->name . ' robot']) |
||
| 54 | ->setTo($this->email) |
||
| 55 | ->setSubject(Module::translate('module', 'Password reset for') . ' ' . Yii::$app->name) |
||
| 56 | ->send(); |
||
| 57 | } |
||
| 58 | return false; |
||
| 59 | } |
||
| 86 |