diff options
author | Frederic Guillot <fred@kanboard.net> | 2015-12-17 21:38:13 -0500 |
---|---|---|
committer | Frederic Guillot <fred@kanboard.net> | 2015-12-17 21:38:13 -0500 |
commit | c83f589b22cd548c6de10bfb0c18f767ba7dffd8 (patch) | |
tree | a5842339000632f2270f7732bfd67d46fe88b4cd /app/Controller/User.php | |
parent | d0af39170c2c53cf7aa5178a0563bd0d2c667d46 (diff) |
Show only active projects in board selector
Diffstat (limited to 'app/Controller/User.php')
-rw-r--r-- | app/Controller/User.php | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/app/Controller/User.php b/app/Controller/User.php index 0968d5a5..8b6df44c 100644 --- a/app/Controller/User.php +++ b/app/Controller/User.php @@ -26,7 +26,7 @@ class User extends Base { $content = $this->template->render($template, $params); $params['user_content_for_layout'] = $content; - $params['board_selector'] = $this->projectUserRole->getProjectsByUser($this->userSession->getId()); + $params['board_selector'] = $this->projectUserRole->getActiveProjectsByUser($this->userSession->getId()); if (isset($params['user'])) { $params['title'] = ($params['user']['name'] ?: $params['user']['username']).' (#'.$params['user']['id'].')'; @@ -51,7 +51,7 @@ class User extends Base $this->response->html( $this->template->layout('user/index', array( - 'board_selector' => $this->projectUserRole->getProjectsByUser($this->userSession->getId()), + 'board_selector' => $this->projectUserRole->getActiveProjectsByUser($this->userSession->getId()), 'title' => t('Users').' ('.$paginator->getTotal().')', 'paginator' => $paginator, ))); @@ -72,7 +72,7 @@ class User extends Base $this->response->html( $this->template->layout('user/profile', array( - 'board_selector' => $this->projectUserRole->getProjectsByUser($this->userSession->getId()), + 'board_selector' => $this->projectUserRole->getActiveProjectsByUser($this->userSession->getId()), 'title' => $user['name'] ?: $user['username'], 'user' => $user, ) @@ -92,7 +92,7 @@ class User extends Base 'timezones' => $this->config->getTimezones(true), 'languages' => $this->config->getLanguages(true), 'roles' => $this->role->getApplicationRoles(), - 'board_selector' => $this->projectUserRole->getProjectsByUser($this->userSession->getId()), + 'board_selector' => $this->projectUserRole->getActiveProjectsByUser($this->userSession->getId()), 'projects' => $this->project->getList(), 'errors' => $errors, 'values' => $values + array('role' => Role::APP_USER), |