Lines Matching defs:domain

20  *   $conf['plugin']['authad']['account_suffix']     = '@my.domain.org';
21 * $conf['plugin']['authad']['base_dn'] = 'DC=my,DC=domain,DC=org';
22 * $conf['plugin']['authad']['domain_controllers'] = 'srv1.domain.org,srv2.domain.org';
48 * @var array hold connection data for a specific AD domain
53 * @var array open connections for each AD domain, as adLDAP objects
126 // other can do's are changed in $this->_loadServerConfig() base on domain setup
133 * Load domain config on capability check
141 //capabilities depend on config, which may change depending on domain
142 $domain = $this->getUserDomain($INPUT->server->str('REMOTE_USER'));
143 $this->loadServerConfig($domain);
260 // add the user's domain to the groups
261 $domain = $this->getUserDomain($user);
262 if ($domain && !in_array("domain-$domain", $info['grps'])) {
263 $info['grps'][] = $this->cleanGroup("domain-$domain");
318 * Normalizes domain parts, does not modify the user name itself (unlike cleanGroup)
326 $domain = '';
328 // get NTLM or Kerberos domain part
331 if ($dom) $domain = $dom;
333 if ($dom) $domain = $dom;
336 $domain = PhpString::strtolower(trim($domain));
339 // is this a known, valid domain or do we work without account suffix? if not discard
341 (!isset($this->conf[$domain]) || !is_array($this->conf[$domain])) &&
344 $domain = '';
347 // reattach domain
348 if ($domain) $user = "$user@$domain";
628 * When you pass null as domain, it will reuse any existing domain.
630 * domain if no current one is available.
632 * @param string|null $domain The AD domain to use
635 protected function initAdLdap($domain)
637 if (is_null($domain) && is_array($this->opts)) {
638 $domain = $this->opts['domain'];
641 $this->opts = $this->loadServerConfig((string) $domain);
642 if (isset($this->adldap[$domain])) return $this->adldap[$domain];
646 $this->adldap[$domain] = new adLDAP($this->opts);
647 return $this->adldap[$domain];
653 $this->adldap[$domain] = null;
659 * Get the domain part from a user
666 [, $domain] = sexplode('@', $user, 2, '');
667 return $domain;
673 * When an account suffix is set, we strip the domain part from the user
687 * Fetch the configuration for the given AD domain
689 * @param string $domain current AD domain
692 protected function loadServerConfig($domain)
697 $opts['domain'] = $domain;
699 // add possible domain specific configuration
700 if ($domain && is_array($this->conf[$domain] ?? '')) foreach ($this->conf[$domain] as $key => $val) {
742 * The default domain has an empty string as key
744 * @return array associative array(key => domain)
751 // add default domain, using the name from account suffix