Followup r79433, hide realname from output when realnames are a hidden pref.
This commit is contained in:
parent
1f874c59d2
commit
c49946aa39
1 changed files with 2 additions and 2 deletions
|
|
@ -55,7 +55,7 @@ class ApiQueryUserInfo extends ApiQueryBase {
|
|||
}
|
||||
|
||||
protected function getCurrentUserInfo() {
|
||||
global $wgUser, $wgRequest;
|
||||
global $wgUser, $wgRequest, $wgHiddenPrefs;
|
||||
$result = $this->getResult();
|
||||
$vals = array();
|
||||
$vals['id'] = intval( $wgUser->getId() );
|
||||
|
|
@ -115,7 +115,7 @@ class ApiQueryUserInfo extends ApiQueryBase {
|
|||
$vals['ratelimits'] = $this->getRateLimits();
|
||||
}
|
||||
|
||||
if ( isset( $this->prop['realname'] ) ) {
|
||||
if ( isset( $this->prop['realname'] ) && !in_array( 'realname', $wgHiddenPrefs ) ) {
|
||||
$vals['realname'] = $wgUser->getRealName();
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue