Lines Matching refs:config

23     protected $config;
39 * @param array $config
41 public function __construct($config)
45 $this->config = $this->prepareConfig($config);
47 $this->ldap = new LdapClient($this->config);
51 * Setup sane config defaults
53 * @param array $config
56 protected function prepareConfig($config)
64 $config = array_merge($defaults, $config);
67 if (!$config['port']) {
68 $config['port'] = ($config['encryption'] === 'ssl') ? 636 : 389;
72 $config['use_ssl'] = ($config['encryption'] === 'ssl');
73 if ($config['validate'] === 'none') {
74 $config['ssl_validate_cert'] = false;
75 } elseif ($config['validate'] === 'self') {
76 $config['ssl_allow_self_signed'] = true;
79 $config['suffix'] = ltrim(PhpString::strtolower($config['suffix']), '@');
80 $config['primarygroup'] = $this->cleanGroup($config['primarygroup']);
82 return $config;
92 if (!$this->config['sso']) return;
98 if ($this->config['sso_charset']) {
100 $user = iconv($this->config['sso_charset'], 'UTF-8', $user);
102 $user = mb_convert_encoding($user, 'UTF-8', $this->config['sso_charset']);
122 * Access to the config values
125 * config values through the client
128 * @return mixed returns null on missing config
132 if (!isset($this->config[$key])) return null;
133 return $this->config[$key];
143 $user = $this->prepareBindUser($this->config['admin_username']);
144 $ok = $this->authenticate($user, $this->config['admin_password']);
164 if (!$this->ldap->isConnected() && $this->config['encryption'] === 'tls') {
206 if ($this->config['usefscache']) {
226 if ($this->config['usefscache'] && $info !== null) {
338 foreach ($this->config['attributes'] as $attribute) {