mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2025-06-21 01:25:55 +02:00
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:
parent
1b5eea4750
commit
3a2f3ce1cc
1 changed files with 2 additions and 2 deletions
|
@ -60,7 +60,7 @@ class UserCacheKeyGenerator
|
||||||
return 'user$_'.User::ID_ANONYMOUS;
|
return 'user$_'.User::ID_ANONYMOUS;
|
||||||
}
|
}
|
||||||
|
|
||||||
//In the most cases we can just use the username (its unique)
|
//Use the unique user id and the locale to generate the key
|
||||||
return 'user_'.$user->getUsername().'_'.$locale;
|
return 'user_'.$user->getID().'_'.$locale;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue