app/models/Data/User.php: adding setOAuthId()
This commit is contained in:
parent
ddb9d8934d
commit
ad3bbdd6bc
1 changed files with 14 additions and 0 deletions
|
|
@ -295,6 +295,20 @@ class User extends Model
|
||||||
return $this->linkedin_id;
|
return $this->linkedin_id;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param string $provider
|
||||||
|
* @param string $id
|
||||||
|
* @return $this
|
||||||
|
*/
|
||||||
|
public function setOAuthId($provider, $id)
|
||||||
|
{
|
||||||
|
$method = 'set' . ucfirst($provider) . 'Id';
|
||||||
|
if (method_exists($this, $method)) {
|
||||||
|
$this->$method($id);
|
||||||
|
}
|
||||||
|
return $this;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param string $id
|
* @param string $id
|
||||||
* @return User
|
* @return User
|
||||||
|
|
|
||||||
Reference in a new issue