diff --git a/include/functions.inc b/include/functions.inc
index d6518ba9033fa315b2ae6769663ec4aa3d23fbc7..36c0ddf9e43357e690970849b89d84c1e0453e18 100644 (file)
--- a/include/functions.inc
+++ b/include/functions.inc
/* Sadly we've no proper return values here. Use the error message instead. */
if (!preg_match("/Success/i", $ldap->error)){
- echo sprintf(_("FATAL: Error when connecting the LDAP. Server said '%s'."), $ldap->get_error()));
+ echo sprintf(_("FATAL: Error when connecting the LDAP. Server said '%s'."), $ldap->get_error());
exit();
}
function ldap_expired_account($config, $userdn, $username)
{
- $this->config= $config;
- $ldap= $this->config->get_ldap_link();
+ //$this->config= $config;
+ $ldap= $config->get_ldap_link();
$ldap->cat($userdn);
$attrs= $ldap->fetch();
{
global $config;
- $pattern= "/^[^,]+,".preg_quote(get_people_ou())."/";
+ $pattern= "/^[^,]+,".preg_quote(get_people_ou())."/i";
$base= preg_replace($pattern, '', $dn);
/* Set to base, if we're not on a correct subtree */
global $config;
if (get_people_ou() != ""){
- $dn= preg_replace('/,'.get_people_ou().'/' , ',', $dn);
+ $dn= preg_replace('/,'.get_people_ou().'/i' , ',', $dn);
}
if (get_groups_ou() != ""){
- $dn= preg_replace('/,'.get_groups_ou().'/' , ',', $dn);
+ $dn= preg_replace('/,'.get_groups_ou().'/i' , ',', $dn);
}
$base= preg_replace ('/^[^,]+,/i', '', $dn);