Archived
1
0
Fork 0

Merge branch '15-settings-oauth-connect-disconnect'

This commit is contained in:
Henrik Hautakoski 2018-06-12 23:04:01 +02:00
commit 313ba55098
6 changed files with 175 additions and 11 deletions

View file

@ -227,6 +227,17 @@ class User extends Model
return $this;
}
public function getSocialLinks()
{
$providers = [
'github' => $this->getGithubId(),
'gitlab' => $this->getGitlabId(),
'google' => $this->getGoogleId()
];
return array_filter($providers);
}
static public function createFromOAuthData(UserDataInterface $data)
{
$oauth_id = 'set' . $data->getProvider() . 'Id';