Exemplo n.º 1
0
 /**
  * Constructor
  * @param ILDAPWrapper $ldap
  * @param string $configPrefix a string with the prefix for the configkey column (appconfig table)
  * @param string|null $configID a string with the value for the appid column (appconfig table) or null for on-the-fly connections
  */
 public function __construct(ILDAPWrapper $ldap, $configPrefix = '', $configID = 'user_ldap')
 {
     parent::__construct($ldap);
     $this->configPrefix = $configPrefix;
     $this->configID = $configID;
     $this->configuration = new Configuration($configPrefix, !is_null($configID));
     $memcache = \OC::$server->getMemCacheFactory();
     if ($memcache->isAvailable()) {
         $this->cache = $memcache->create();
     } else {
         $this->cache = \OC\Cache::getGlobalCache();
     }
     $this->hasPagedResultSupport = $this->ldap->hasPagedResultSupport();
     $this->doNotValidate = !in_array($this->configPrefix, Helper::getServerConfigurationPrefixes());
 }
Exemplo n.º 2
0
 /**
  * @param ILDAPWrapper $ldap
  */
 public function __construct(ILDAPWrapper $ldap)
 {
     $this->ldap = $ldap;
     $this->cache = \OC\Cache::getGlobalCache();
 }