Fixing the fix ;-)

shadowLastChange has to be an integer
This commit is contained in:
Ralf Becker 2009-04-09 08:11:24 +00:00
parent b0521b0b14
commit 5291d0ac39
2 changed files with 2 additions and 2 deletions

View File

@ -556,7 +556,7 @@ class accounts_ldap
$data['account_passwd'] = auth::encrypt_ldap($data['account_passwd']);
}
$to_write['userpassword'] = $data['account_passwd'];
$to_write['shadowLastChange'] = (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
// - if it's unset an account is enabled AND does never expire

View File

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