summaryrefslogtreecommitdiff
path: root/app/Model/ProjectGroupRole.php
diff options
context:
space:
mode:
Diffstat (limited to 'app/Model/ProjectGroupRole.php')
-rw-r--r--app/Model/ProjectGroupRole.php6
1 files changed, 3 insertions, 3 deletions
diff --git a/app/Model/ProjectGroupRole.php b/app/Model/ProjectGroupRole.php
index ee6ee7cb..591b28c6 100644
--- a/app/Model/ProjectGroupRole.php
+++ b/app/Model/ProjectGroupRole.php
@@ -101,10 +101,10 @@ class ProjectGroupRole extends Base
*/
public function getAssignableUsers($project_id)
{
- return $this->db->table(self::TABLE)
+ return $this->db->table(User::TABLE)
->columns(User::TABLE.'.id', User::TABLE.'.username', User::TABLE.'.name')
- ->join(GroupMember::TABLE, 'group_id', 'group_id', self::TABLE)
- ->join(User::TABLE, 'id', 'user_id', GroupMember::TABLE)
+ ->join(GroupMember::TABLE, 'user_id', 'id', User::TABLE)
+ ->join(self::TABLE, 'group_id', 'group_id', GroupMember::TABLE)
->eq(self::TABLE.'.project_id', $project_id)
->in(self::TABLE.'.role', array(Role::PROJECT_MANAGER, Role::PROJECT_MEMBER))
->asc(User::TABLE.'.username')