Index: trunk/phase3/includes/api/ApiQueryUserInfo.php |
— | — | @@ -55,7 +55,7 @@ |
56 | 56 | } |
57 | 57 | |
58 | 58 | protected function getCurrentUserInfo() { |
59 | | - global $wgUser, $wgRequest; |
| 59 | + global $wgUser, $wgRequest, $wgHiddenPrefs; |
60 | 60 | $result = $this->getResult(); |
61 | 61 | $vals = array(); |
62 | 62 | $vals['id'] = intval( $wgUser->getId() ); |
— | — | @@ -115,7 +115,7 @@ |
116 | 116 | $vals['ratelimits'] = $this->getRateLimits(); |
117 | 117 | } |
118 | 118 | |
119 | | - if ( isset( $this->prop['realname'] ) ) { |
| 119 | + if ( isset( $this->prop['realname'] ) && !in_array( 'realname', $wgHiddenPrefs ) ) { |
120 | 120 | $vals['realname'] = $wgUser->getRealName(); |
121 | 121 | } |
122 | 122 | |