diff options
author | Frederic Guillot <fred@kanboard.net> | 2017-03-11 15:24:34 -0500 |
---|---|---|
committer | Frederic Guillot <fred@kanboard.net> | 2017-03-11 15:24:34 -0500 |
commit | a22b8f3dc73555800caf55768f04a7a2ce4af7f2 (patch) | |
tree | 60257cb9b508da83be5a9477c434fb53cc3c6f6d /app/Controller/UserCredentialController.php | |
parent | 469112918d0cfa6a43a7fdb829cd19bdf85cfcbe (diff) |
Make user actions available from contextual menu
Diffstat (limited to 'app/Controller/UserCredentialController.php')
-rw-r--r-- | app/Controller/UserCredentialController.php | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/app/Controller/UserCredentialController.php b/app/Controller/UserCredentialController.php index 98fe967d..23e7edba 100644 --- a/app/Controller/UserCredentialController.php +++ b/app/Controller/UserCredentialController.php @@ -47,14 +47,14 @@ class UserCredentialController extends BaseController if ($this->userModel->update($values)) { $this->flash->success(t('Password modified successfully.')); $this->userLockingModel->resetFailedLogin($user['username']); + $this->response->redirect($this->helper->url->to('UserViewController', 'show', array('user_id' => $user['id'])), true); + return; } else { $this->flash->failure(t('Unable to change the password.')); } - - return $this->response->redirect($this->helper->url->to('UserViewController', 'show', array('user_id' => $user['id']))); } - return $this->changePassword($values, $errors); + $this->changePassword($values, $errors); } /** @@ -97,14 +97,14 @@ class UserCredentialController extends BaseController if ($valid) { if ($this->userModel->update($values)) { $this->flash->success(t('User updated successfully.')); + $this->response->redirect($this->helper->url->to('UserCredentialController', 'changeAuthentication', array('user_id' => $user['id'])), true); + return; } else { - $this->flash->failure(t('Unable to update your user.')); + $this->flash->failure(t('Unable to update this user.')); } - - return $this->response->redirect($this->helper->url->to('UserCredentialController', 'changeAuthentication', array('user_id' => $user['id']))); } - return $this->changeAuthentication($values, $errors); + $this->changeAuthentication($values, $errors); } /** |