Merge branch 'main' into session_2025_03_22

This commit is contained in:
Ludy 2025-03-23 09:40:53 +01:00 committed by GitHub
commit e7b3fd0859
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -333,7 +333,7 @@ public class UserController {
}
// Invalidate all sessions before deleting the user
List<SessionInformation> sessionsInformations =
sessionRegistry.getAllSessions(authentication.getPrincipal(), false);
sessionRegistry.getAllSessions(username, false);
for (SessionInformation sessionsInformation : sessionsInformations) {
sessionRegistry.expireSession(sessionsInformation.getSessionId());
sessionRegistry.removeSessionInformation(sessionsInformation.getSessionId());