diff --git a/conf/config.inc.php b/conf/config.inc.php index 9af5d66..920f972 100644 --- a/conf/config.inc.php +++ b/conf/config.inc.php @@ -162,6 +162,9 @@ $use_disablecomment = false; $use_disablecomment_required = false; +$show_validitystatus = true; +$use_updatestarttime = true; +$use_updateendtime = true; # Local password policy # This is applied before directory password policy diff --git a/htdocs/display.php b/htdocs/display.php index 85cdc44..13ce0f2 100644 --- a/htdocs/display.php +++ b/htdocs/display.php @@ -17,6 +17,7 @@ $canLockAccount=""; $isAccountEnabled = ""; $lockDate = ""; +$isAccountValid = ""; if (isset($_GET["dn"]) and $_GET["dn"]) { $dn = $_GET["dn"]; @@ -161,6 +162,10 @@ $isAccountEnabled = $directory->isAccountEnabled($ldap, $dn); } + if ($show_validitystatus) { + $isAccountValid = $directory->isAccountValid($ldap, $dn); + } + }}} } @@ -194,5 +199,6 @@ } else { $smarty->assign('msg_resetpasswordresult',''); } +$smarty->assign("isAccountValid", $isAccountValid); ?> diff --git a/htdocs/index.php b/htdocs/index.php index a3c26f1..eda34ae 100644 --- a/htdocs/index.php +++ b/htdocs/index.php @@ -207,7 +207,9 @@ function sha256($string) $smarty->assign('use_enablecomment_required',$use_enablecomment_required); $smarty->assign('use_disablecomment',$use_disablecomment); $smarty->assign('use_disablecomment_required',$use_disablecomment_required); - +$smarty->assign('show_validitystatus',$show_validitystatus); +$smarty->assign('use_updatestarttime',$attributes_map['starttime'] ? $use_updatestarttime : false); +$smarty->assign('use_updateendtime',$attributes_map['endtime'] ? $use_updateendtime : false); # Assign messages $smarty->assign('lang',$lang); diff --git a/lang/en.inc.php b/lang/en.inc.php index c6c3f91..53f37fb 100644 --- a/lang/en.inc.php +++ b/lang/en.inc.php @@ -13,8 +13,10 @@ $messages['accountnotenabled'] = "Fail to enable account"; $messages['accountnotlocked'] = "Fail to lock account"; $messages['accountnotunlocked'] = "Fail to unlock account"; +$messages['accountnotvalid'] = "Account is not valid"; $messages['accountunlocked'] = "Account is not locked"; $messages['accountstatus'] = "Account status"; +$messages['accountvalid'] = "Account is valid"; $messages['actionforbidden'] = "Action forbidden"; $messages['changesubject'] = "Your password has been changed"; $messages['changesubjectforadmin'] = "User password has been changed"; diff --git a/lang/fr.inc.php b/lang/fr.inc.php index 2df7cfa..e2a0328 100644 --- a/lang/fr.inc.php +++ b/lang/fr.inc.php @@ -13,8 +13,10 @@ $messages['accountnotenabled'] = "Échec de l'activation du compte"; $messages['accountnotlocked'] = "Échec de verrouillage du compte"; $messages['accountnotunlocked'] = "Échec de déverrouillage du compte"; +$messages['accountnotvalid'] = "Le compte n'est pas valide"; $messages['accountstatus'] = "Statut du compte"; $messages['accountunlocked'] = "Le compte n'est pas verrouillé"; +$messages['accountvalid'] = "Le compte est valide"; $messages['actionforbidden'] = "Action interdite"; $messages['changesubject'] = "Votre mot de passe a été changé"; $messages['changesubjectforadmin'] = "Le mot de passe d'un utilisateur a été changé"; diff --git a/templates/display.tpl b/templates/display.tpl index a8495be..1c4199a 100644 --- a/templates/display.tpl +++ b/templates/display.tpl @@ -376,8 +376,30 @@ {/if} - {/if} - {/if} + {/if} + {/if} + + {if $show_validitystatus} + {if $isAccountValid} +
+
+

+ + {$msg_accountvalid} +

+
+
+ {else} +
+
+

+ + {$msg_accountnotvalid} +

+
+
+ {/if} + {/if}