Reedy has submitted this change and it was merged.

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(-)

Approvals:
  CSteipp: Looks good to me, approved
  Reedy: Verified; Looks good to me, approved



diff --git a/includes/api/ApiUnblock.php b/includes/api/ApiUnblock.php
index bc7f6e7..55e7331 100644
--- a/includes/api/ApiUnblock.php
+++ b/includes/api/ApiUnblock.php
@@ -75,7 +75,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/52079
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I830e210122a6608b4b599bb0b59c1c99b073c06d
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/core
Gerrit-Branch: wmf/1.21wmf10
Gerrit-Owner: Reedy <[email protected]>
Gerrit-Reviewer: Alex Monk <[email protected]>
Gerrit-Reviewer: CSteipp <[email protected]>
Gerrit-Reviewer: Hashar <[email protected]>
Gerrit-Reviewer: Reedy <[email protected]>
Gerrit-Reviewer: jenkins-bot

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

Reply via email to