diff --git a/config/example-config.php b/config/example-config.php index b731e2a0..40778353 100644 --- a/config/example-config.php +++ b/config/example-config.php @@ -186,7 +186,7 @@ $c->admin_email ='calendar-admin@example.com'; // 'default_value' => array("date_format_type" => "E","locale" => "fr_FR"), /** foreach key set start and length in the string provided by ldap example for openLDAP timestamp : 20070503162215Z **/ -// 'format_udpated'=> array('Y' => array(0,4),'m' => array(4,2),'d'=> array(6,2),'H' => array(8,2),'M'=>array(10,2),'S' => array(12,2)) +// 'format_updated'=> array('Y' => array(0,4),'m' => array(4,2),'d'=> array(6,2),'H' => array(8,2),'M'=>array(10,2),'S' => array(12,2)) // // ); // diff --git a/inc/drivers_ldap.php b/inc/drivers_ldap.php index 65b9ee30..97f9f732 100644 --- a/inc/drivers_ldap.php +++ b/inc/drivers_ldap.php @@ -162,7 +162,7 @@ function LDAP_check($username, $password ){ $ldap_timestamp = $valid[$mapping["updated"]]; - foreach($c->authenticate_hook['config']['format_udpated'] as $k => $v) + foreach($c->authenticate_hook['config']['format_updated'] as $k => $v) $$k = substr($ldap_timestamp,$v[0],$v[1]); //ok it is valid is already exist in db ? @@ -233,7 +233,7 @@ function sync_LDAP(){ foreach($users_to_create as $username){ $valid=$ldap_users_info[$username]; $ldap_timestamp = $valid[$mapping["updated"]]; - foreach($c->authenticate_hook['config']['format_udpated'] as $k => $v) + foreach($c->authenticate_hook['config']['format_updated'] as $k => $v) $$k = substr($ldap_timestamp,$v[0],$v[1]); $user = new RSCDSUser(0); $validUserField = array_keys($user->Fields); @@ -260,7 +260,7 @@ function sync_LDAP(){ foreach($users_to_update as $key=> $username){ $valid=$ldap_users_info[$username]; $ldap_timestamp = $valid[$mapping["updated"]]; - foreach($c->authenticate_hook['config']['format_udpated'] as $k => $v) + foreach($c->authenticate_hook['config']['format_updated'] as $k => $v) $$k = substr($ldap_timestamp,$v[0],$v[1]); $ldap_timestamp = "$Y"."$m"."$d"."$H"."$M"."$S"; $db_timestamp = substr(strtr($db_users_info[$username]['updated'], array(':' => '',' '=>'','-'=>'')),0,14);