summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--apps/user_ldap/lib/access.php15
1 files changed, 12 insertions, 3 deletions
diff --git a/apps/user_ldap/lib/access.php b/apps/user_ldap/lib/access.php
index d047149fc73..aea5026ea66 100644
--- a/apps/user_ldap/lib/access.php
+++ b/apps/user_ldap/lib/access.php
@@ -434,16 +434,25 @@ class Access extends LDAPUtility {
$ocname = $this->dn2ocname($ldapObject['dn'], $nameByLDAP, $isUsers);
if($ocname) {
$ownCloudNames[] = $ocname;
- $this->cacheDisplayName($ocname, $nameByLDAP);
+ if($isUsers) {
+ //cache the user names so it does not need to be retrieved
+ //again later (e.g. sharing dialogue).
+ $this->cacheUserDisplayName($ocname, $nameByLDAP);
+ }
}
continue;
}
return $ownCloudNames;
}
- public function cacheDisplayName($uid, $displayName) {
+ /**
+ * @brief caches the user display name
+ * @param string the internal owncloud username
+ * @param string the display name
+ */
+ public function cacheUserDisplayName($ocname, $displayName) {
$cacheKeyTrunk = 'getDisplayName';
- $this->connection->writeToCache($cacheKeyTrunk.$uid,$displayName);
+ $this->connection->writeToCache($cacheKeyTrunk.$ocname, $displayName);
}
/**