Simplify ApiUserRights::getUrUser()
authorSiebrand Mazeland <s.mazeland@xs4all.nl>
Sun, 17 Nov 2013 19:22:39 +0000 (20:22 +0100)
committerIAlex <codereview@emsenhuber.ch>
Sun, 17 Nov 2013 19:46:18 +0000 (19:46 +0000)
Remove unneeded else and local variable assignment.

Change-Id: I166d811b220e925be11da5c49b6fe55f0d8e71c8

includes/api/ApiUserrights.php

index 5e068cb..4664e1e 100644 (file)
@@ -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() {