From d9b3e2ee6728d974af855d782f2929e92e0da294 Mon Sep 17 00:00:00 2001 From: Siebrand Mazeland Date: Sun, 17 Nov 2013 20:22:39 +0100 Subject: [PATCH] Simplify ApiUserRights::getUrUser() Remove unneeded else and local variable assignment. Change-Id: I166d811b220e925be11da5c49b6fe55f0d8e71c8 --- includes/api/ApiUserrights.php | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/includes/api/ApiUserrights.php b/includes/api/ApiUserrights.php index 5e068cbdcc..4664e1ea84 100644 --- a/includes/api/ApiUserrights.php +++ b/includes/api/ApiUserrights.php @@ -67,13 +67,11 @@ class ApiUserrights extends ApiBase { $status = $form->fetchUser( $params['user'] ); if ( !$status->isOK() ) { $this->dieStatus( $status ); - } else { - $user = $status->value; } - $this->mUser = $user; + $this->mUser = $status->value; - return $user; + return $status->value; } public function mustBePosted() { -- 2.20.1