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