summaryrefslogtreecommitdiff
path: root/app/Controller/User.php
diff options
context:
space:
mode:
authorFrederic Guillot <fred@kanboard.net>2015-12-15 22:39:39 -0500
committerFrederic Guillot <fred@kanboard.net>2015-12-15 22:39:39 -0500
commit7f980cffcc3a20f5c93e128313c1a4a47b39dc8e (patch)
treea1fdbee2ecc6026c192126db8be78db45e22b80b /app/Controller/User.php
parent9e1f4fa6c7eae1b46cf5431ab085b82e970e2d57 (diff)
Show profile link for @username mentions
Diffstat (limited to 'app/Controller/User.php')
-rw-r--r--app/Controller/User.php22
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