summaryrefslogtreecommitdiffstats
path: root/lib/private/User/Manager.php
diff options
context:
space:
mode:
Diffstat (limited to 'lib/private/User/Manager.php')
-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 f41468d4926..7d8c6d48b2c 100644
--- a/lib/private/User/Manager.php
+++ b/lib/private/User/Manager.php
@@ -157,6 +157,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;