Add table/pagination to the project list

This commit is contained in:
Frederic Guillot
2015-01-31 11:21:43 -05:00
parent e1be338053
commit 9a98013736
14 changed files with 135 additions and 123 deletions

View File

@@ -321,6 +321,22 @@ class ProjectPermission extends Base
->getAll('projects.id', 'name');
}
/**
* Return a list of project ids where the user is member
*
* @access public
* @param integer $user_id User id
* @return []integer
*/
public function getMemberProjectIds($user_id)
{
return $this->db
->table(Project::TABLE)
->eq('user_id', $user_id)
->join(self::TABLE, 'project_id', 'id')
->findAllByColumn('projects.id');
}
/**
* Return a list of active projects where the user is member
*