コード例 #1
0
ファイル: user.php プロジェクト: BacLuc/newGryfiPage
 public function getMemberOfGroups()
 {
     $cacheKey = 'getMemberOf' . $this->getUsername();
     if ($this->connection->isCached($cacheKey)) {
         return $this->connection->getFromCache($cacheKey);
     }
     $groupDNs = $this->access->readAttribute($this->getDN(), 'memberOf');
     $this->connection->writeToCache($cacheKey, $groupDNs);
     return $groupDNs;
 }
コード例 #2
0
ファイル: access.php プロジェクト: olucao/owncloud-core
 /**
  * gets a SID of the domain of the given dn
  * @param string $dn
  * @return string|bool
  */
 public function getSID($dn)
 {
     $domainDN = $this->getDomainDNFromDN($dn);
     $cacheKey = 'getSID-' . $domainDN;
     if ($this->connection->isCached($cacheKey)) {
         return $this->connection->getFromCache($cacheKey);
     }
     $objectSid = $this->readAttribute($domainDN, 'objectsid');
     if (!is_array($objectSid) || empty($objectSid)) {
         $this->connection->writeToCache($cacheKey, false);
         return false;
     }
     $domainObjectSid = $this->convertSID2Str($objectSid[0]);
     $this->connection->writeToCache($cacheKey, $domainObjectSid);
     return $domainObjectSid;
 }