Archived
1
0
Fork 0

app/models/Data/User.php: add gitlab_id and google_id

This commit is contained in:
Henrik Hautakoski 2018-06-08 00:12:30 +02:00
parent 22627a811c
commit 25d8e712e4

View file

@ -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';