diff --git a/app/models/Data/User.php b/app/models/Data/User.php index 82c438e..a01d346 100644 --- a/app/models/Data/User.php +++ b/app/models/Data/User.php @@ -247,6 +247,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';