summaryrefslogtreecommitdiff
path: root/app/Model/ProjectUserRole.php
diff options
context:
space:
mode:
authorFrederic Guillot <fred@kanboard.net>2015-12-17 21:38:13 -0500
committerFrederic Guillot <fred@kanboard.net>2015-12-17 21:38:13 -0500
commitc83f589b22cd548c6de10bfb0c18f767ba7dffd8 (patch)
treea5842339000632f2270f7732bfd67d46fe88b4cd /app/Model/ProjectUserRole.php
parentd0af39170c2c53cf7aa5178a0563bd0d2c667d46 (diff)
Show only active projects in board selector
Diffstat (limited to 'app/Model/ProjectUserRole.php')
-rw-r--r--app/Model/ProjectUserRole.php14
1 files changed, 13 insertions, 1 deletions
diff --git a/app/Model/ProjectUserRole.php b/app/Model/ProjectUserRole.php
index 28e6c8c6..b2c38622 100644
--- a/app/Model/ProjectUserRole.php
+++ b/app/Model/ProjectUserRole.php
@@ -20,7 +20,19 @@ class ProjectUserRole extends Base
const TABLE = 'project_has_users';
/**
- * Get the list of project visible by the given user
+ * Get the list of active project for the given user
+ *
+ * @access public
+ * @param integer $user_id
+ * @return array
+ */
+ public function getActiveProjectsByUser($user_id)
+ {
+ return $this->getProjectsByUser($user_id, $status = array(Project::ACTIVE));
+ }
+
+ /**
+ * Get the list of project visible for the given user
*
* @access public
* @param integer $user_id