From 8eb739bb910fb91737c6ce65f244eb9a3ac8f35c Mon Sep 17 00:00:00 2001 From: Frederic Guillot Date: Sun, 23 Aug 2015 13:15:59 -0400 Subject: Add Gitlab authentication --- app/Model/User.php | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'app/Model/User.php') 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 @@ -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 * -- cgit v1.2.3