diff options
author | Arthur Schiwon <blizzz@owncloud.com> | 2014-04-16 17:16:51 +0200 |
---|---|---|
committer | Arthur Schiwon <blizzz@owncloud.com> | 2014-04-22 18:36:43 +0200 |
commit | c1c2f2c49e4d30a7bd039837661af143054b6769 (patch) | |
tree | c2157f7f11592c7eec3de1fb7dabe24d9d1f7837 | |
parent | 1c71d5c444a0f4b2263ffb1d2a40969880151015 (diff) | |
download | nextcloud-server-c1c2f2c49e4d30a7bd039837661af143054b6769.tar.gz nextcloud-server-c1c2f2c49e4d30a7bd039837661af143054b6769.zip |
add additional comments, PHPdoc and check whether it's really applicable
-rw-r--r-- | apps/user_ldap/lib/access.php | 15 |
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); } /** |