Use proper casing of username in avatar filesystem setup

* before you could request an avatar for User instead of user
  which sets up the filesystem for that user twice causing
  the sharing codes collision detection to detect a lot of
  collisions

Signed-off-by: Morris Jobke <hey@morrisjobke.de>
This commit is contained in:
Morris Jobke 2016-09-30 14:57:54 +02:00
parent 04d0daed12
commit e4ece33e80
1 changed files with 2 additions and 0 deletions

View File

@ -84,6 +84,8 @@ class AvatarManager implements IAvatarManager {
if (is_null($user)) { if (is_null($user)) {
throw new \Exception('user does not exist'); throw new \Exception('user does not exist');
} }
// sanitize userID - fixes casing issue (needed for the filesystem stuff that is done below)
$userId = $user->getUID();
/* /*
* Fix for #22119 * Fix for #22119