Fix issues where some user settings cannot be loaded when the user id differs in case sensitivity

Signed-off-by: Joas Schilling <coding@schilljs.com>
This commit is contained in:
Joas Schilling 2016-10-21 11:25:22 +02:00
parent 6902fb578f
commit e12e27fa65
No known key found for this signature in database
GPG key ID: E166FD8976B3BAC8

View file

@ -155,6 +155,16 @@ class Manager extends PublicEmitter implements IUserManager {
return $this->cachedUsers[$uid];
}
if (method_exists($backend, 'loginName2UserName')) {
$loginName = $backend->loginName2UserName($uid);
if ($loginName !== false) {
$uid = $loginName;
}
if (isset($this->cachedUsers[$uid])) {
return $this->cachedUsers[$uid];
}
}
$user = new User($uid, $backend, $this, $this->config);
if ($cacheUser) {
$this->cachedUsers[$uid] = $user;