Loading lib/Service/UserService.php +7 −2 Original line number Diff line number Diff line Loading @@ -532,11 +532,16 @@ class UserService { } // Finally, log out the current session if it's the same user (also clears remember-me cookies) // Note: In OCC/admin scenarios, isLoggedIn() will be false, so this block won't execute if ($logoutCurrentSession) { try { if ($this->userSession->isLoggedIn() && $this->userSession->getUser() && $this->userSession->getUser()->getUID() === $username) { // Check if there's an active session first (safely handles OCC/admin scenarios) if ($this->userSession->isLoggedIn()) { $currentUser = $this->userSession->getUser(); if ($currentUser && $currentUser->getUID() === $username) { $this->userSession->logout(); } } } catch (Exception $e) { $this->logger->error($e, ['app' => Application::APP_ID]); } Loading Loading
lib/Service/UserService.php +7 −2 Original line number Diff line number Diff line Loading @@ -532,11 +532,16 @@ class UserService { } // Finally, log out the current session if it's the same user (also clears remember-me cookies) // Note: In OCC/admin scenarios, isLoggedIn() will be false, so this block won't execute if ($logoutCurrentSession) { try { if ($this->userSession->isLoggedIn() && $this->userSession->getUser() && $this->userSession->getUser()->getUID() === $username) { // Check if there's an active session first (safely handles OCC/admin scenarios) if ($this->userSession->isLoggedIn()) { $currentUser = $this->userSession->getUser(); if ($currentUser && $currentUser->getUID() === $username) { $this->userSession->logout(); } } } catch (Exception $e) { $this->logger->error($e, ['app' => Application::APP_ID]); } Loading