File tree Expand file tree Collapse file tree 1 file changed +5
-3
lines changed
Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -53,7 +53,7 @@ public function getAccountID() {
5353 }
5454
5555 public function getAccountEmail () {
56- return idx ($ this ->loadOAuthAccountData (), 'confirmed_email ' );
56+ return idx ($ this ->loadOAuthAccountData (), 'email ' );
5757 }
5858
5959 public function getAccountURI () {
@@ -99,8 +99,10 @@ public function getExtraTokenParameters() {
9999
100100 protected function loadOAuthAccountData () {
101101 $ uri = id (new PhutilURI ($ this ->getMediaWikiURI ('rest.php/oauth2/resource/profile ' )))
102- ->replaceQueryParam ('access_token ' , $ this ->getAccessToken ());
103- list ($ body ) = id (new HTTPSFuture ($ uri ))->resolvex ();
102+ $ future = new HTTPSFuture ($ uri );
103+ $ token_header = sprintf ('token %s ' , $ this ->getAccessToken ());
104+ $ future ->addHeader ('Authorization ' , $ token_header );
105+ list ($ body ) = $ future ->resolvex ();
104106 try {
105107 $ data = phutil_json_decode ($ body );
106108 return $ data ['result ' ];
You can’t perform that action at this time.
0 commit comments