shadowLastChange vs. shadowlastchange. Normalize to shadowlastchange - all lower case

This commit is contained in:
Klaus Leithoff 2010-11-17 14:39:12 +00:00
parent 19e6251df9
commit 1e314fb59d
2 changed files with 3 additions and 3 deletions

View File

@ -572,7 +572,7 @@ class accounts_ldap
$data['account_passwd'] = auth::encrypt_ldap($data['account_passwd']); $data['account_passwd'] = auth::encrypt_ldap($data['account_passwd']);
} }
$to_write['userpassword'] = $data['account_passwd']; $to_write['userpassword'] = $data['account_passwd'];
$to_write['shadowLastChange'] = round((time()-$utc_diff) / (24*3600)); $to_write['shadowlastchange'] = round((time()-$utc_diff) / (24*3600));
} }
// both status and expires are encoded in the single shadowexpire value in LDAP // both status and expires are encoded in the single shadowexpire value in LDAP
// - if it's unset an account is enabled AND does never expire // - if it's unset an account is enabled AND does never expire
@ -592,7 +592,7 @@ class accounts_ldap
} }
//error_log(__METHOD__.__LINE__.$data['account_lid'].'#'.$data['account_lastpwd_change'].'#'); //error_log(__METHOD__.__LINE__.$data['account_lid'].'#'.$data['account_lastpwd_change'].'#');
if ($data['account_lastpwd_change']) $to_write['shadowlastchange'] = round(($data['account_lastpwd_change']-$utc_diff)/(24*3600)); if ($data['account_lastpwd_change']) $to_write['shadowlastchange'] = round(($data['account_lastpwd_change']-$utc_diff)/(24*3600));
if (isset($data['account_lastpwd_change']) && $data['account_lastpwd_change']==0) $to_write['shadowLastChange'] = 0; if (isset($data['account_lastpwd_change']) && $data['account_lastpwd_change']==0) $to_write['shadowlastchange'] = 0;
// lastlogin and lastlogin from are not availible via the shadowAccount object class // lastlogin and lastlogin from are not availible via the shadowAccount object class
// $to_write['phpgwaccountlastlogin'] = $data['lastlogin']; // $to_write['phpgwaccountlastlogin'] = $data['lastlogin'];
// $to_write['phpgwaccountlastloginfrom'] = $data['lastloginfrom']; // $to_write['phpgwaccountlastloginfrom'] = $data['lastloginfrom'];

View File

@ -149,7 +149,7 @@ class auth_ldap implements auth_backend
$allValues = ldap_get_entries($ds, $sri); $allValues = ldap_get_entries($ds, $sri);
$entry['userpassword'] = auth::encrypt_password($new_passwd); $entry['userpassword'] = auth::encrypt_password($new_passwd);
$entry['shadowLastChange'] = round((time()-date('Z')) / (24*3600)); $entry['shadowlastchange'] = round((time()-date('Z')) / (24*3600));
$dn = $allValues[0]['dn']; $dn = $allValues[0]['dn'];