summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJoas Schilling <coding@schilljs.com>2016-10-21 11:25:22 +0200
committerJoas Schilling <coding@schilljs.com>2016-10-21 11:25:22 +0200
commite12e27fa65953e96eb3bb66981eb8b201c7a064d (patch)
treeb9e3415a516fb681685f9b1444eea598b6d429fd
parent6902fb578f8674885f45a7dbab924380d451a5d3 (diff)
downloadnextcloud-server-e12e27fa65953e96eb3bb66981eb8b201c7a064d.tar.gz
nextcloud-server-e12e27fa65953e96eb3bb66981eb8b201c7a064d.zip
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>
-rw-r--r--lib/private/user/manager.php10
1 files changed, 10 insertions, 0 deletions
diff --git a/lib/private/user/manager.php b/lib/private/user/manager.php
index eb86873a26f..e638823ad29 100644
--- a/lib/private/user/manager.php
+++ b/lib/private/user/manager.php
@@ -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;