示例#1
0
 public function getUsersCount($baseGroup = "/", $regexp = "", $filterProperty = null, $filterValue = null, $recursive = true)
 {
     $check_cache = $this->getCountFromCache();
     if (is_array($check_cache) && $check_cache["count"] > 0) {
         return $check_cache["count"];
     }
     if (!empty($this->hasGroupsMapping)) {
         if ($baseGroup == "/") {
             $this->dynamicFilter = "!(" . $this->hasGroupsMapping . "=*)";
         } else {
             $this->dynamicFilter = $this->hasGroupsMapping . "=" . basename($baseGroup);
         }
     }
     $res = $this->getUserEntries(AJXP_Utils::regexpToLdap($regexp), true, null);
     $this->saveCountToCache($res);
     $this->dynamicFilter = null;
     return $res["count"];
 }