Fix problem with cache key generation if the username contained an @ sign or any other special character

This fixes issue #504
This commit is contained in:
Jan Böhmer 2024-01-29 21:08:25 +01:00
parent 1b5eea4750
commit 3a2f3ce1cc

View file

@ -60,7 +60,7 @@ class UserCacheKeyGenerator
return 'user$_'.User::ID_ANONYMOUS;
}
//In the most cases we can just use the username (its unique)
return 'user_'.$user->getUsername().'_'.$locale;
//Use the unique user id and the locale to generate the key
return 'user_'.$user->getID().'_'.$locale;
}
}