From 7aa8023eb1fc17554b610cadc59ab62e7e5de7f2 Mon Sep 17 00:00:00 2001 From: Joas Schilling Date: Fri, 22 Mar 2024 01:04:48 +0100 Subject: [PATCH] fix(logging): Restore the option to log with debug level Signed-off-by: Joas Schilling --- lib/private/legacy/OC_User.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/lib/private/legacy/OC_User.php b/lib/private/legacy/OC_User.php index 238de2a888fa9..ef1c10792408d 100644 --- a/lib/private/legacy/OC_User.php +++ b/lib/private/legacy/OC_User.php @@ -39,8 +39,10 @@ use OC\User\LoginException; use OCP\EventDispatcher\IEventDispatcher; use OCP\ILogger; +use OCP\IGroupManager; +use OCP\ISession; +use OCP\IUser; use OCP\IUserManager; -use OCP\IUserSession; use OCP\Server; use OCP\User\Events\BeforeUserLoggedInEvent; use OCP\User\Events\UserLoggedInEvent; @@ -351,7 +353,7 @@ public static function isAdminUser($uid) { * @return string|false uid or false */ public static function getUser() { - $uid = Server::get(IUserSession::class)->getUser()?->getUID(); + $uid = Server::get(ISession::class)?->get('user_id'); if (!is_null($uid) && self::$incognitoMode === false) { return $uid; } else {