From c1a775f44851b51b1acbd82c5a10d61027663483 Mon Sep 17 00:00:00 2001 From: Alessandro Briosi Date: Mon, 16 Apr 2018 11:40:03 +0200 Subject: [PATCH] set username = email when authenticating with Google/Facebook/LinkdeIn #130 --- src/User/AuthClient/Facebook.php | 3 ++- src/User/AuthClient/Google.php | 3 ++- src/User/AuthClient/LinkedIn.php | 3 ++- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/src/User/AuthClient/Facebook.php b/src/User/AuthClient/Facebook.php index e2a3ce1..b910539 100644 --- a/src/User/AuthClient/Facebook.php +++ b/src/User/AuthClient/Facebook.php @@ -31,6 +31,7 @@ class Facebook extends BaseFacebook implements AuthClientInterface */ public function getUsername() { - return null; + /* returns the e-mail as it corresponds with the username */ + return $this->getEmail(); } } diff --git a/src/User/AuthClient/Google.php b/src/User/AuthClient/Google.php index 871dabc..4f04e01 100644 --- a/src/User/AuthClient/Google.php +++ b/src/User/AuthClient/Google.php @@ -31,6 +31,7 @@ class Google extends BaseGoogle implements AuthClientInterface */ public function getUsername() { - return null; + /* returns the e-mail as it corresponds with the username */ + return $this->getEmail(); } } diff --git a/src/User/AuthClient/LinkedIn.php b/src/User/AuthClient/LinkedIn.php index 9528760..b99aa5b 100644 --- a/src/User/AuthClient/LinkedIn.php +++ b/src/User/AuthClient/LinkedIn.php @@ -31,6 +31,7 @@ class LinkedIn extends BaseLinkedIn implements AuthClientInterface */ public function getUsername() { - return null; + /* returns the e-mail as it corresponds with the username */ + return $this->getEmail(); } }