@@ -29,11 +29,11 @@ public function getWikiPageURI($title, $query_params = null) {
2929
3030 public function getAccountID () {
3131 $ this ->getHandshakeData ();
32- return idx ($ this ->getUserInfo (), 'userid ' );
32+ return idx ($ this ->loadOAuthAccountData (), 'userid ' );
3333 }
3434
3535 public function getAccountName () {
36- return idx ($ this ->getUserInfo (), 'username ' );
36+ return idx ($ this ->loadOAuthAccountData (), 'username ' );
3737 }
3838
3939 public function getAccountURI () {
@@ -45,12 +45,12 @@ public function getAccountURI() {
4545 }
4646
4747 public function getAccountImageURI () {
48- $ info = $ this ->getUserInfo ();
48+ $ info = $ this ->loadOAuthAccountData ();
4949 return idx ($ info , 'profile_image_url ' );
5050 }
5151
5252 public function getAccountRealName () {
53- $ info = $ this ->getUserInfo ();
53+ $ info = $ this ->loadOAuthAccountData ();
5454 return idx ($ info , 'name ' );
5555 }
5656
@@ -106,7 +106,7 @@ protected function getTokenBaseURI() {
106106 return $ this ->mediaWikiBaseURI ('rest.php/oauth2/access_token ' );
107107 }
108108
109- private function getUserInfo () {
109+ private function loadOAuthAccountData () {
110110 if ($ this ->userinfo === null ) {
111111 $ uri = id (new PhutilURI ($ this ->mediaWikiBaseURI ('rest.php/oauth2/resource/profile ' )))
112112 ->replaceQueryParam ('access_token ' , $ this ->getAccessToken ());
0 commit comments