fix(users): don't look up for users when they change language on root page

This commit is contained in:
Hivert Quentin
2024-12-18 16:41:46 +01:00
parent 6a4d03b35f
commit 223c25fb86
2 changed files with 5 additions and 3 deletions

View File

@@ -374,8 +374,10 @@ static BOOL debugLeaks;
request = [_ctx request];
login = [SOGoUser getDecryptedUsernameIfNeeded: _key request: request];
user = [SOGoUser userWithLogin: login roles: nil];
if([login isEqualToString: @"changeLanguage"])
user = nil;
else
user = [SOGoUser userWithLogin: login roles: nil];
if (user)
userFolder = [$(@"SOGoUserFolder") objectWithName: login
inContainer: self];

View File

@@ -198,7 +198,7 @@
this.changeLanguage = function ($event) {
// Reload page
$window.location.href = ApplicationBaseURL + 'login?language=' + this.creds.language;
$window.location.href = ApplicationBaseURL + 'changeLanguage?language=' + this.creds.language;
};
this.canChangePassword = function (form) {