mirror of
https://gitlab.easter-eggs.com/ee/ldapsaisie.git
synced 2024-11-18 16:19:06 +01:00
LSaddon :: samba : added function generate_shadowExpire_from_sambaPwdMustChange()
This commit is contained in:
parent
7c6d3db03a
commit
45205a1b6a
1 changed files with 16 additions and 0 deletions
|
@ -354,4 +354,20 @@ define('LS_SAMBA_INFINITY_TIME',2147483647);
|
||||||
return $ldapObject -> getFData(LS_SAMBA_PROFILE_PATH_FORMAT);
|
return $ldapObject -> getFData(LS_SAMBA_PROFILE_PATH_FORMAT);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Generation de l'attribut shadowExpire à partir de
|
||||||
|
* l'attribut sambaPwdMustChange
|
||||||
|
*
|
||||||
|
* @author Benjamin Renard <brenard@easter-eggs.com>
|
||||||
|
*
|
||||||
|
* @retval string La valeur de shadowExpire
|
||||||
|
*/
|
||||||
|
function generate_shadowExpire_from_sambaPwdMustChange($ldapObject) {
|
||||||
|
$time=$ldapObject -> getValue('sambaPwdMustChange');
|
||||||
|
if (!empty($time)) {
|
||||||
|
$time=(int)$time[0];
|
||||||
|
return (string)round($time/86400);
|
||||||
|
}
|
||||||
|
return '';
|
||||||
|
}
|
||||||
?>
|
?>
|
||||||
|
|
Loading…
Reference in a new issue