Add Gitlab authentication

This commit is contained in:
Frederic Guillot
2015-08-23 13:15:59 -04:00
parent 297c11e48e
commit 8eb739bb91
40 changed files with 501 additions and 9 deletions

View File

@@ -138,6 +138,22 @@ class User extends Base
return $this->db->table(self::TABLE)->eq('github_id', $github_id)->findOne();
}
/**
* Get a specific user by the Gitlab id
*
* @access public
* @param string $gitlab_id Gitlab user id
* @return array|boolean
*/
public function getByGitlabId($gitlab_id)
{
if (empty($gitlab_id)) {
return false;
}
return $this->db->table(self::TABLE)->eq('gitlab_id', $gitlab_id)->findOne();
}
/**
* Get a specific user by the username
*