File tree Expand file tree Collapse file tree 1 file changed +11
-15
lines changed
Expand file tree Collapse file tree 1 file changed +11
-15
lines changed Original file line number Diff line number Diff line change @@ -98,21 +98,17 @@ public function getExtraTokenParameters() {
9898 }
9999
100100 protected function loadOAuthAccountData () {
101- if ($ this ->userinfo === null ) {
102- $ uri = id (new PhutilURI ($ this ->getMediaWikiURI ('rest.php/oauth2/resource/profile ' )))
103- ->replaceQueryParam ('access_token ' , $ this ->getAccessToken ());
104- list ($ body ) = id (new HTTPSFuture ($ uri ))->resolvex ();
105- try {
106- $ data = phutil_json_decode ($ body );
107- return $ data ['result ' ];
108- } catch (PhutilJSONParserException $ ex ) {
109- throw new Exception (
110- pht (
111- 'Expected valid JSON response from MediaWiki request ' ),
112- $ ex );
113- }
114- }
115- return $ this ->userinfo ;
101+ $ 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 ();
104+ try {
105+ $ data = phutil_json_decode ($ body );
106+ return $ data ['result ' ];
107+ } catch (PhutilJSONParserException $ ex ) {
108+ throw new Exception (
109+ pht (
110+ 'Expected valid JSON response from MediaWiki request ' ),
111+ $ ex );
116112 }
117113
118114 protected function willProcessTokenRequestResponse ($ body ) {
You can’t perform that action at this time.
0 commit comments