CSteipp has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/52078


Change subject: (bug 43518) API action=unblock should return the user name, not 
the full user object
......................................................................

(bug 43518) API action=unblock should return the user name, not the full user 
object

Change-Id: I830e210122a6608b4b599bb0b59c1c99b073c06d
---
M includes/api/ApiUnblock.php
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/78/52078/1

diff --git a/includes/api/ApiUnblock.php b/includes/api/ApiUnblock.php
index e34771f..ff9ac47 100644
--- a/includes/api/ApiUnblock.php
+++ b/includes/api/ApiUnblock.php
@@ -79,7 +79,7 @@
 
                $res['id'] = $block->getId();
                $target = $block->getType() == Block::TYPE_AUTO ? '' : 
$block->getTarget();
-               $res['user'] = $target;
+               $res['user'] = $target instanceof User ? $target->getName() : 
$target;
                $res['userid'] = $target instanceof User ? $target->getId() : 0;
                $res['reason'] = $params['reason'];
                $this->getResult()->addValue( null, $this->getModuleName(), 
$res );

-- 
To view, visit https://gerrit.wikimedia.org/r/52078
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I830e210122a6608b4b599bb0b59c1c99b073c06d
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: REL1_20
Gerrit-Owner: CSteipp <[email protected]>
Gerrit-Reviewer: Alex Monk <[email protected]>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to