Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F14718916
D14753.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
863 B
Referenced Files
None
Subscribers
None
D14753.diff
View Options
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
Details
Attached
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)
Attached To
Mode
D14753: Read profile images from Google OAuth correctly
Attached
Detach File
Event Timeline
Log In to Comment