Complete missing bits of Google OAuth2 provider
Summary: Added support for profile images and URLs. Test Plan: Looked at /settings/panel/oauth-google/, refreshed profile picture, click profile URL, saw correct profile. Reviewers: epriestley Reviewed By: epriestley CC: aran, Korvin Differential Revision: https://secure.phabricator.com/D4556
This commit is contained in:
@@ -95,13 +95,15 @@ final class PhabricatorOAuthProviderGoogle extends PhabricatorOAuthProvider {
|
||||
}
|
||||
|
||||
public function retrieveUserProfileImage() {
|
||||
// No apparent API access to Plus yet.
|
||||
$uri = idx($this->userData, 'picture');
|
||||
if ($uri) {
|
||||
return HTTPSFuture::loadContent($uri);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
public function retrieveUserAccountURI() {
|
||||
// No apparent API access to Plus yet.
|
||||
return null;
|
||||
return 'https://plus.google.com/'.$this->userData['id'];
|
||||
}
|
||||
|
||||
public function retrieveUserRealName() {
|
||||
|
||||
Reference in New Issue
Block a user