Page MenuHomePhabricator

D14753.diff
No OneTemporary

D14753.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
Sat, Jan 18, 8:46 PM (20 h, 15 m)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
7010269
Default Alt Text
D14753.diff (863 B)

Event Timeline