| Conditions | 2 |
| Paths | 2 |
| Total Lines | 15 |
| Code Lines | 8 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 0 |
| CRAP Score | 6 |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 21 | public function message(): string |
||
| 22 | { |
||
| 23 | $app = Di::getDefault()->getApp(); |
||
| 24 | |||
| 25 | $userExists = Users::findFirst([ |
||
| 26 | 'conditions' => 'email = ?0 and is_deleted = 0', |
||
| 27 | 'bind' => [$this->entity->email] |
||
| 28 | ]); |
||
| 29 | |||
| 30 | if (is_object($userExists)) { |
||
| 31 | $resetPasswordUrl = $app->url . '/user/reset/' . $userExists->user_activation_key; |
||
| 32 | } |
||
| 33 | |||
| 34 | return "Hi {$this->entity->email}, click the following link to reset your password: <a href='{$resetPasswordUrl}'>Reset Password</a> <br /><br /> |
||
|
|
|||
| 35 | Thanks {$this->fromUser->firstname} {$this->fromUser->lastname} ( {$this->fromUser->currentCompany->name} ) "; |
||
| 36 | } |
||
| 54 |