From cc417531b890f1983c446027289c2277d501102b Mon Sep 17 00:00:00 2001 From: Alex Monk Date: Sun, 30 Dec 2012 13:59:48 +0000 Subject: [PATCH] (bug 43518) API action=unblock should return the user name, not the full user object Change-Id: I830e210122a6608b4b599bb0b59c1c99b073c06d --- includes/api/ApiUnblock.php | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) 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 @@ class ApiUnblock extends ApiBase { $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 ); -- 1.7.5.4