diff options
| author | Frederic Guillot <fred@kanboard.net> | 2016-03-26 17:25:54 -0400 |
|---|---|---|
| committer | Frederic Guillot <fred@kanboard.net> | 2016-03-26 17:25:54 -0400 |
| commit | 4ca716ec47863f3eef6c851de7a4f37650f8ea6e (patch) | |
| tree | af7ca983e3cec6300c1689bd76eb99e37fc2f799 /app/Controller/User.php | |
| parent | 820c929ab38273c80d0930e2e6140dd7676ba4df (diff) | |
Move avatar actions to controller AvatarFile
Diffstat (limited to 'app/Controller/User.php')
| -rw-r--r-- | app/Controller/User.php | 37 |
1 files changed, 0 insertions, 37 deletions
diff --git a/app/Controller/User.php b/app/Controller/User.php index 8c02ef7f..f7d7d2e0 100644 --- a/app/Controller/User.php +++ b/app/Controller/User.php @@ -405,41 +405,4 @@ class User extends Base 'user' => $user, ))); } - - /** - * Display avatar page - */ - public function avatar() - { - $user = $this->getUser(); - - $this->response->html($this->helper->layout->user('user/avatar', array( - 'user' => $user, - ))); - } - - /** - * Upload Avatar - */ - public function uploadAvatar() - { - $user = $this->getUser(); - - if (! $this->avatarFile->uploadFile($user['id'], $this->request->getFileInfo('avatar'))) { - $this->flash->failure(t('Unable to upload the file.')); - } - - $this->response->redirect($this->helper->url->to('user', 'avatar', array('user_id' => $user['id']))); - } - - /** - * Remove Avatar image - */ - public function removeAvatar() - { - $this->checkCSRFParam(); - $user = $this->getUser(); - $this->avatarFile->remove($user['id']); - $this->response->redirect($this->helper->url->to('user', 'avatar', array('user_id' => $user['id']))); - } } |
