Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/server.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'apps/user_ldap/lib/user/user.php')
-rw-r--r--apps/user_ldap/lib/user/user.php5
1 files changed, 3 insertions, 2 deletions
diff --git a/apps/user_ldap/lib/user/user.php b/apps/user_ldap/lib/user/user.php
index 4707f0d0dd2..c47cbf3a523 100644
--- a/apps/user_ldap/lib/user/user.php
+++ b/apps/user_ldap/lib/user/user.php
@@ -287,8 +287,9 @@ class User {
public function getMemberOfGroups() {
$cacheKey = 'getMemberOf'.$this->getUsername();
- if($this->connection->isCached($cacheKey)) {
- return $this->connection->getFromCache($cacheKey);
+ $memberOfGroups = $this->connection->getFromCache($cacheKey);
+ if(!is_null($memberOfGroups)) {
+ return $memberOfGroups;
}
$groupDNs = $this->access->readAttribute($this->getDN(), 'memberOf');
$this->connection->writeToCache($cacheKey, $groupDNs);