ip-rob
Forum Replies Created
-
Forum: Plugins
In reply to: [A5 Custom Login Page] Great plugin – minor suggestionOK, I see how to use the SVG. I’m creating some custom HTML to put in the message box above the logon form with works well for me.
Do you know of a way to change the background of the page?
Great help! Thanks!
Forum: Plugins
In reply to: [Active Directory Integration] Domain prefix and trust setupI added some code to allow for trust setups and to generally derive the basedn and domain controllers.
This works for my trust setup by leaving the basedn and domain controllers values blank in the admin module.
Original code:
$this->_log(ADI_LOG_NOTICE,'username: '.$username); $this->_log(ADI_LOG_NOTICE,'password: **not shown**'); // Log informations $this->_log(ADI_LOG_INFO,"Options for adLDAP connection:\n". "- account_suffix: $this->_account_suffix\n". "- base_dn: $this->_base_dn\n". "- domain_controllers: $this->_domain_controllers\n". "- ad_port: $this->_port\n". "- use_tls: ".(int) $this->_use_tls."\n". "- network timeout: ". $this->_network_timeout);
Modified code:
$this->_log(ADI_LOG_NOTICE,'username: '.$username); $this->_log(ADI_LOG_NOTICE,'password: **not shown**'); $this->_log(ADI_LOG_NOTICE,'basedn: '.$this->_base_dn); // If account suffix has domain and _base_dn is blank then // set the _base_dn using the domain information in account suffix if (strpos($this->_account_suffix,'@') !== false && $this->_base_dn == '' && strpos($this->_account_suffix,'.') !== false) { $parts = explode('@',$this->_account_suffix); $parts = explode('.',$parts[1]); $this->_base_dn = 'DC='.$parts[0].',DC='.$parts[1]; $this->_log(ADI_LOG_INFO,"Derived _base_dn - ".$this->_base_dn); } // If domain controllers is blank then assume it is // a trust setup and use account suffix as DC if ($this->_domain_controllers == '') { $this->_domain_controllers = str_replace('@','',$this->_account_suffix); $this->_log(ADI_LOG_INFO,"Derived _domain_controllers ".$this->_domain_controllers); } // Log informations $this->_log(ADI_LOG_INFO,"Options for adLDAP connection:\n". "- account_suffix: $this->_account_suffix\n". "- base_dn: $this->_base_dn\n". "- domain_controllers: $this->_domain_controllers\n". "- ad_port: $this->_port\n". "- use_tls: ".(int) $this->_use_tls."\n". "- network timeout: ". $this->_network_timeout);
Forum: Plugins
In reply to: [Active Directory Integration] Domain prefix and trust setupFixing the prefix entry was relatively easy. I modified the ad-integration.php file as follows:
Original:
// IMPORTANT! $this->_authenticated = false; $user_id = NULL; $username = strtolower($username); $password = stripslashes($password);
Modified:
// IMPORTANT! $this->_authenticated = false; $user_id = NULL; $username = strtolower($username); if (strpos($username,'\\') !== false) { $this->_log(ADI_LOG_NOTICE,'USERNAME-ORIG:'.$username); $parts = explode("\\\\",$username); $username = $parts[1].'@'.$parts[0].'.local'; $this->_log(ADI_LOG_NOTICE,'USERNAME-MOD:'.$username); } $password = stripslashes($password);
It simply modifies the login if it was entered in with the domain prefix and converts it to a FQDN.