diff --git a/lib/Controller/API/Commons/Validators/LoginValidator.php b/lib/Controller/API/Commons/Validators/LoginValidator.php index b2c3c77a8b..406b690a16 100644 --- a/lib/Controller/API/Commons/Validators/LoginValidator.php +++ b/lib/Controller/API/Commons/Validators/LoginValidator.php @@ -28,9 +28,7 @@ public function __construct( KleinController $controller ) { } public function _validate() { - - $user = $this->controller->getUser(); - if( empty( $user ) ){ + if( !$this->controller->isLoggedIn() ){ throw new AuthenticationError( "Invalid Login.", 401 ); } }