| Conditions | 4 |
| Paths | 4 |
| Total Lines | 20 |
| Code Lines | 11 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 25 | public function inviteSend(): ?string |
||
| 26 | { |
||
| 27 | // init model |
||
| 28 | $model = new FormInviteSend(); |
||
| 29 | |||
| 30 | if ($model->send()) { |
||
| 31 | if ($model->validate()) { |
||
| 32 | if ($model->make()) { |
||
| 33 | App::$Session->getFlashBag()->add('success', __('Invite was successful send!')); |
||
| 34 | } else { |
||
| 35 | App::$Session->getFlashBag()->add('error', __('Mail server connection is failed!')); |
||
| 36 | } |
||
| 37 | } else { |
||
| 38 | App::$Session->getFlashBag()->add('error', __('Form validation is failed')); |
||
| 39 | } |
||
| 40 | } |
||
| 41 | |||
| 42 | // render view |
||
| 43 | return $this->view->render('user/invite', [ |
||
| 44 | 'model' => $model |
||
| 45 | ]); |
||
| 48 |