Merge "Add fa to collation list."
[lhc/web/wiklou.git] / includes / api / ApiUnblock.php
index bc7f6e7..55e7331 100644 (file)
@@ -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 );