diff --git a/lib/Controller/ClustersController.php b/lib/Controller/ClustersController.php index 62ffb25f..1b59a348 100644 --- a/lib/Controller/ClustersController.php +++ b/lib/Controller/ClustersController.php @@ -110,10 +110,7 @@ class ClustersController extends GenericApiController */ protected function init(string $backend): void { - $user = $this->userSession->getUser(); - if (null === $user) { - throw Exceptions::NotLoggedIn(); - } + Util::getUser(); $this->backend = ClustersBackendManager::get($backend); diff --git a/lib/Manager/FsManager.php b/lib/Manager/FsManager.php index 558d916f..d8567546 100644 --- a/lib/Manager/FsManager.php +++ b/lib/Manager/FsManager.php @@ -87,7 +87,7 @@ class FsManager // Anything else needs a user if (null === $user) { - throw new \Exception('User not logged in: no timeline root'); + throw Exceptions::NotLoggedIn(); } $uid = $user->getUID();