From 678a3abf6d83deca705076034a2c2c1f61647db5 Mon Sep 17 00:00:00 2001 From: Robin Appelman Date: Mon, 8 Feb 2016 13:45:52 +0100 Subject: handle no user set for personal global auth --- apps/files_external/lib/auth/password/globalauth.php | 2 ++ 1 file changed, 2 insertions(+) (limited to 'apps/files_external/lib') diff --git a/apps/files_external/lib/auth/password/globalauth.php b/apps/files_external/lib/auth/password/globalauth.php index b1e52fb53ab..0684ba7998d 100644 --- a/apps/files_external/lib/auth/password/globalauth.php +++ b/apps/files_external/lib/auth/password/globalauth.php @@ -74,6 +74,8 @@ class GlobalAuth extends AuthMechanism { public function manipulateStorageConfig(StorageConfig &$storage, IUser $user = null) { if ($storage->getType() === StorageConfig::MOUNT_TYPE_ADMIN) { $uid = ''; + } elseif (is_null($user)) { + throw new InsufficientDataForMeaningfulAnswerException('No credentials saved'); } else { $uid = $user->getUID(); } -- cgit v1.2.3