Exemple #1
0
 public function __construct(Connection $connection, ILDAPWrapper $ldap, Manager $userManager)
 {
     parent::__construct($ldap);
     $this->connection = $connection;
     $this->userManager = $userManager;
     $this->userManager->setLdapAccess($this);
 }
Exemple #2
0
 /**
  * Constructor
  * @param Configuration $configuration an instance of Configuration
  * @param ILDAPWrapper $ldap an instance of ILDAPWrapper
  * @param Access $access
  */
 public function __construct(Configuration $configuration, ILDAPWrapper $ldap, Access $access)
 {
     parent::__construct($ldap);
     $this->configuration = $configuration;
     if (is_null(Wizard::$l)) {
         Wizard::$l = \OC::$server->getL10N('user_ldap');
     }
     $this->access = $access;
     $this->result = new WizardResult();
 }
 /**
  * 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();
     }
     $helper = new Helper();
     $this->doNotValidate = !in_array($this->configPrefix, $helper->getServerConfigurationPrefixes());
     $this->hasPagedResultSupport = intval($this->configuration->ldapPagingSize) !== 0 || $this->ldap->hasPagedResultSupport();
 }