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:
Asher Baker
2013-01-21 18:53:26 -08:00
committed by epriestley
parent bad95c15ce
commit 727c326e2e

View File

@@ -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() {