Reedy has uploaded a new change for review.
https://gerrit.wikimedia.org/r/52079
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/79/52079/1
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: newchange
Gerrit-Change-Id: I830e210122a6608b4b599bb0b59c1c99b073c06d
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: wmf/1.21wmf10
Gerrit-Owner: Reedy <[email protected]>
Gerrit-Reviewer: Alex Monk <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits