Show profile link for @username mentions

This commit is contained in:
Frederic Guillot
2015-12-15 22:39:39 -05:00
parent 9e1f4fa6c7
commit 7f980cffcc
11 changed files with 133 additions and 24 deletions

View File

@@ -57,6 +57,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
*