From 4fa91c435fc5ffa5bc27bb6dd1af50011e5aa43a Mon Sep 17 00:00:00 2001 From: domenico Date: Fri, 8 Nov 2024 16:58:28 +0100 Subject: [PATCH] Fixed empty uid in default project template controller when user is not logged --- lib/Controller/API/Commons/Validators/LoginValidator.php | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) 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 ); } }