mirror of
https://github.com/silentsakky/zarafa-webapp-passwd
synced 2026-08-05 15:03:17 +02:00
Update sambaPwdLastSet when changing sambaNTPassword
This commit is contained in:
parent
2e39b60f5b
commit
db34d7f872
1 changed files with 1 additions and 0 deletions
|
|
@ -135,6 +135,7 @@ class PasswdModule extends Module
|
||||||
if (in_array('sambaSamAccount', $entries[0]['objectclass'])) {
|
if (in_array('sambaSamAccount', $entries[0]['objectclass'])) {
|
||||||
$nthash = strtoupper(bin2hex(mhash(MHASH_MD4, iconv("UTF-8","UTF-16LE", $passwd))));
|
$nthash = strtoupper(bin2hex(mhash(MHASH_MD4, iconv("UTF-8","UTF-16LE", $passwd))));
|
||||||
$entry['sambaNTPassword'] = $nthash;
|
$entry['sambaNTPassword'] = $nthash;
|
||||||
|
$entry['sambaPwdLastSet'] = strval(time());
|
||||||
}
|
}
|
||||||
ldap_modify($ldapconn, $userdn, $entry);
|
ldap_modify($ldapconn, $userdn, $entry);
|
||||||
if (ldap_errno($ldapconn) === 0) {
|
if (ldap_errno($ldapconn) === 0) {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue