Archived
1
0
Fork 0

app/models/Data/User.php: adding "linkedin_id" field.

This commit is contained in:
Henrik Hautakoski 2018-08-08 22:49:49 +02:00
parent 160533f88f
commit 6312f5d22e
No known key found for this signature in database
GPG key ID: 839F3A7EAFAEAFAA

View file

@ -32,6 +32,8 @@ class User extends Model
protected $google_id;
protected $linkedin_id;
public function initialize()
{
$this->useDynamicUpdate(true);
@ -227,12 +229,31 @@ class User extends Model
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()
{
$providers = [
'github' => $this->getGithubId(),
'gitlab' => $this->getGitlabId(),
'google' => $this->getGoogleId()
'github' => $this->getGithubId(),
'gitlab' => $this->getGitlabId(),
'google' => $this->getGoogleId(),
'linkedin' => $this->getLinkedinId()
];
return array_filter($providers);