app/models/Data/User.php: adding "linkedin_id" field.
This commit is contained in:
parent
160533f88f
commit
6312f5d22e
1 changed files with 24 additions and 3 deletions
|
|
@ -32,6 +32,8 @@ class User extends Model
|
||||||
|
|
||||||
protected $google_id;
|
protected $google_id;
|
||||||
|
|
||||||
|
protected $linkedin_id;
|
||||||
|
|
||||||
public function initialize()
|
public function initialize()
|
||||||
{
|
{
|
||||||
$this->useDynamicUpdate(true);
|
$this->useDynamicUpdate(true);
|
||||||
|
|
@ -227,12 +229,31 @@ class User extends Model
|
||||||
return $this;
|
return $this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return string|null
|
||||||
|
*/
|
||||||
|
public function getLinkedinId()
|
||||||
|
{
|
||||||
|
return $this->linkedin_id;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param string $id
|
||||||
|
* @return User
|
||||||
|
*/
|
||||||
|
public function setLinkedinId($id)
|
||||||
|
{
|
||||||
|
$this->linkedin_id = (string) $id;
|
||||||
|
return $this;
|
||||||
|
}
|
||||||
|
|
||||||
public function getSocialLinks()
|
public function getSocialLinks()
|
||||||
{
|
{
|
||||||
$providers = [
|
$providers = [
|
||||||
'github' => $this->getGithubId(),
|
'github' => $this->getGithubId(),
|
||||||
'gitlab' => $this->getGitlabId(),
|
'gitlab' => $this->getGitlabId(),
|
||||||
'google' => $this->getGoogleId()
|
'google' => $this->getGoogleId(),
|
||||||
|
'linkedin' => $this->getLinkedinId()
|
||||||
];
|
];
|
||||||
|
|
||||||
return array_filter($providers);
|
return array_filter($providers);
|
||||||
|
|
|
||||||
Reference in a new issue