From 25d8e712e4a92311956b1411c16f16749c6625b4 Mon Sep 17 00:00:00 2001 From: Henrik Hautakoski Date: Fri, 8 Jun 2018 00:12:30 +0200 Subject: [PATCH] app/models/Data/User.php: add gitlab_id and google_id --- app/models/Data/User.php | 40 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) diff --git a/app/models/Data/User.php b/app/models/Data/User.php index 524ac56..82c438e 100644 --- a/app/models/Data/User.php +++ b/app/models/Data/User.php @@ -30,6 +30,10 @@ class User extends Model protected $github_user; + protected $gitlab_id; + + protected $google_id; + public function initialize() { $this->useDynamicUpdate(true); @@ -207,6 +211,42 @@ class User extends Model return $this; } + /** + * @return mixed + */ + public function getGitlabId() + { + return $this->gitlab_id; + } + + /** + * @param mixed $gitlab_id + * @return User + */ + public function setGitlabId($gitlab_id) + { + $this->gitlab_id = $gitlab_id; + return $this; + } + + /** + * @return mixed + */ + public function getGoogleId() + { + return $this->google_id; + } + + /** + * @param mixed $google_id + * @return User + */ + public function setGoogleId($google_id) + { + $this->google_id = $google_id; + return $this; + } + static public function createFromOAuthData(UserDataInterface $data) { $oauth_id = 'set' . $data->getProvider() . 'Id';