diff options
Diffstat (limited to 'app/Controller/User.php')
-rw-r--r-- | app/Controller/User.php | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/app/Controller/User.php b/app/Controller/User.php index aa548647..0968d5a5 100644 --- a/app/Controller/User.php +++ b/app/Controller/User.php @@ -58,6 +58,28 @@ class User extends Base } /** + * Public user profile + * + * @access public + */ + public function profile() + { + $user = $this->user->getById($this->request->getIntegerParam('user_id')); + + if (empty($user)) { + $this->notfound(); + } + + $this->response->html( + $this->template->layout('user/profile', array( + 'board_selector' => $this->projectUserRole->getProjectsByUser($this->userSession->getId()), + 'title' => $user['name'] ?: $user['username'], + 'user' => $user, + ) + )); + } + + /** * Display a form to create a new user * * @access public |