summaryrefslogtreecommitdiff
path: root/app/Model/User.php
diff options
context:
space:
mode:
Diffstat (limited to 'app/Model/User.php')
-rw-r--r--app/Model/User.php16
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