diff --git a/public_html/includes/addons/LSaddons.samba.php b/public_html/includes/addons/LSaddons.samba.php
index 41c5e6d7..c5a521d1 100644
--- a/public_html/includes/addons/LSaddons.samba.php
+++ b/public_html/includes/addons/LSaddons.samba.php
@@ -354,4 +354,20 @@ define('LS_SAMBA_INFINITY_TIME',2147483647);
return $ldapObject -> getFData(LS_SAMBA_PROFILE_PATH_FORMAT);
}
+ /**
+ * Generation de l'attribut shadowExpire à partir de
+ * l'attribut sambaPwdMustChange
+ *
+ * @author Benjamin Renard
+ *
+ * @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 '';
+ }
?>