diff options
author | Frederic Guillot <fred@kanboard.net> | 2015-08-23 13:15:59 -0400 |
---|---|---|
committer | Frederic Guillot <fred@kanboard.net> | 2015-08-23 13:15:59 -0400 |
commit | 8eb739bb910fb91737c6ce65f244eb9a3ac8f35c (patch) | |
tree | db615be44d945a8dc1880a1238a381ec6534dfa2 /app/Model/User.php | |
parent | 297c11e48e1cf18e5773a7463721d862dfd6063d (diff) |
Add Gitlab authentication
Diffstat (limited to 'app/Model/User.php')
-rw-r--r-- | app/Model/User.php | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/app/Model/User.php b/app/Model/User.php index 1a7a0666..8a7eff4a 100644 --- a/app/Model/User.php +++ b/app/Model/User.php @@ -139,6 +139,22 @@ class User extends Base } /** + * 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 * * @access public |