app/models/Data/User.php: add gitlab_id and google_id
This commit is contained in:
parent
22627a811c
commit
25d8e712e4
1 changed files with 40 additions and 0 deletions
|
|
@ -30,6 +30,10 @@ class User extends Model
|
||||||
|
|
||||||
protected $github_user;
|
protected $github_user;
|
||||||
|
|
||||||
|
protected $gitlab_id;
|
||||||
|
|
||||||
|
protected $google_id;
|
||||||
|
|
||||||
public function initialize()
|
public function initialize()
|
||||||
{
|
{
|
||||||
$this->useDynamicUpdate(true);
|
$this->useDynamicUpdate(true);
|
||||||
|
|
@ -207,6 +211,42 @@ class User extends Model
|
||||||
return $this;
|
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)
|
static public function createFromOAuthData(UserDataInterface $data)
|
||||||
{
|
{
|
||||||
$oauth_id = 'set' . $data->getProvider() . 'Id';
|
$oauth_id = 'set' . $data->getProvider() . 'Id';
|
||||||
|
|
|
||||||
Reference in a new issue