Merge "objectcache: Remove lock()/unlock() stubs from MemcachedClient"
[lhc/web/wiklou.git] / includes / api / ApiQueryUserInfo.php
index 5edf83e..ab8d93a 100644 (file)
@@ -179,7 +179,7 @@ class ApiQueryUserInfo extends ApiQueryBase {
 
                if ( isset( $this->prop['preferencestoken'] ) &&
                        !$this->lacksSameOriginSecurity() &&
-                       $user->isAllowed( 'editmyoptions' )
+                       $this->getPermissionManager()->userHasRight( $user, 'editmyoptions' )
                ) {
                        $vals['preferencestoken'] = $user->getEditToken( '', $this->getMain()->getRequest() );
                }
@@ -200,7 +200,8 @@ class ApiQueryUserInfo extends ApiQueryBase {
                        $vals['realname'] = $user->getRealName();
                }
 
-               if ( $user->isAllowed( 'viewmyprivateinfo' ) && isset( $this->prop['email'] ) ) {
+               if ( $this->getPermissionManager()->userHasRight( $user, 'viewmyprivateinfo' ) &&
+                               isset( $this->prop['email'] ) ) {
                        $vals['email'] = $user->getEmail();
                        $auth = $user->getEmailAuthenticationTimestamp();
                        if ( $auth !== null ) {