From 4ca716ec47863f3eef6c851de7a4f37650f8ea6e Mon Sep 17 00:00:00 2001 From: Frederic Guillot Date: Sat, 26 Mar 2016 17:25:54 -0400 Subject: Move avatar actions to controller AvatarFile --- app/Controller/User.php | 37 ------------------------------------- 1 file changed, 37 deletions(-) (limited to 'app/Controller/User.php') 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']))); - } } -- cgit v1.2.3