| Conditions | 2 |
| Paths | 2 |
| Total Lines | 17 |
| Code Lines | 9 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 0 |
| CRAP Score | 6 |
| Changes | 1 | ||
| Bugs | 0 | Features | 1 |
| 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 | $invitationUrl = $app->url . '/users/invites/' . $this->entity->invite_hash; |
||
| 31 | |||
| 32 | if (is_object($userExists)) { |
||
| 33 | $invitationUrl = $app->url . '/users/link/' . $this->entity->invite_hash; |
||
| 34 | } |
||
| 35 | |||
| 36 | return "Hi {$this->entity->email} you have been invite to the app {$app->name} to create you account please <a href='{$invitationUrl}'>click here</a> <br /><br /> |
||
| 37 | Thanks {$this->fromUser->firstname} {$this->fromUser->lastname} ( {$this->fromUser->currentCompany->name} ) "; |
||
| 38 | } |
||
| 52 |