Merge "(bug 19195) Make user IDs more readily available with the API"
[lhc/web/wiklou.git] / includes / api / ApiQueryUserInfo.php
index cbb35ae..e3bc775 100644 (file)
@@ -63,7 +63,10 @@ class ApiQueryUserInfo extends ApiQueryBase {
 
                if ( isset( $this->prop['blockinfo'] ) ) {
                        if ( $user->isBlocked() ) {
-                               $vals['blockedby'] = User::whoIs( $user->blockedBy() );
+                               $block = $user->getBlock();
+                               $vals['blockid'] = $block->getId();
+                               $vals['blockedby'] = $block->getByName();
+                               $vals['blockedbyid'] = $block->getBy();
                                $vals['blockreason'] = $user->blockedFor();
                        }
                }