| Conditions | 2 |
| Paths | 2 |
| Total Lines | 14 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 25 | public function process() |
||
| 26 | { |
||
| 27 | $response = new \App\Response(); |
||
| 28 | $changePassword = \App\Api::getInstance()->call('Users/ChangePassword', [ |
||
| 29 | 'currentPassword' => $this->request->getRaw('oldPassword'), |
||
| 30 | 'newPassword' => $this->request->getRaw('password'), |
||
| 31 | ], 'put'); |
||
| 32 | if ($changePassword) { |
||
| 33 | $response->setResult(\App\Language::translate('LBL_PASSWORD_CHANGED', 'Users')); |
||
| 34 | } else { |
||
| 35 | $response->setError(\App\Language::translate('LBL_FAILED_PASSWORD_CHANGED', 'Users')); |
||
| 36 | } |
||
| 37 | $response->emit(); |
||
| 38 | } |
||
| 39 | } |
||
| 40 |