Page MenuHomePhabricator

D14753.id35676.diff
No OneTemporary

D14753.id35676.diff

diff --git a/src/auth/PhutilGoogleAuthAdapter.php b/src/auth/PhutilGoogleAuthAdapter.php
--- a/src/auth/PhutilGoogleAuthAdapter.php
+++ b/src/auth/PhutilGoogleAuthAdapter.php
@@ -40,11 +40,22 @@
}
public function getAccountImageURI() {
- return $this->getOAuthAccountData('picture');
+ $image = $this->getOAuthAccountData('image', array());
+ $uri = idx($image, 'url');
+
+ // Change the "sz" parameter ("size") from the default to 100 to ask for
+ // a 100x100px image.
+ if ($uri !== null) {
+ $uri = new PhutilURI($uri);
+ $uri->setQueryParam('sz', 100);
+ $uri = (string)$uri;
+ }
+
+ return $uri;
}
public function getAccountURI() {
- return 'https://plus.google.com/'.$this->getOAuthAccountData('id');
+ return $this->getOAuthAccountData('url');
}
public function getAccountRealName() {

File Metadata

Mime Type
text/plain
Expires
Mon, Apr 14, 1:01 PM (1 w, 2 d ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
7427457
Default Alt Text
D14753.id35676.diff (863 B)

Event Timeline