diff --git a/htdocs/user/fiche.php b/htdocs/user/fiche.php
index f8f6489903c..bac58616bce 100644
--- a/htdocs/user/fiche.php
+++ b/htdocs/user/fiche.php
@@ -1222,7 +1222,7 @@ else
/*
- * Barre d'actions
+ * Buttons actions
*/
print '
';
@@ -1247,13 +1247,21 @@ else
// Si on a un gestionnaire de generation de mot de passe actif
if ($conf->global->USER_PASSWORD_GENERATED != 'none')
{
- if (($user->id != $id && $caneditpassword) && $fuser->login && !$fuser->ldap_sid &&
+ if ($fuser->statut == 0)
+ {
+ print '
'.$langs->trans("ReinitPassword").'';
+ }
+ elseif (($user->id != $id && $caneditpassword) && $fuser->login && !$fuser->ldap_sid &&
(empty($conf->multicompany->enabled) || ($fuser->entity == $conf->entity) || ($conf->multicompany->transverse_mode && $conf->entity == 1)))
{
print '
'.$langs->trans("ReinitPassword").'';
}
- if (($user->id != $id && $caneditpassword) && $fuser->login && !$fuser->ldap_sid &&
+ if ($fuser->statut == 0)
+ {
+ print '
'.$langs->trans("SendNewPassword").'';
+ }
+ else if (($user->id != $id && $caneditpassword) && $fuser->login && !$fuser->ldap_sid &&
(empty($conf->multicompany->enabled) || ($fuser->entity == $conf->entity) || ($conf->multicompany->transverse_mode && $conf->entity == 1)) )
{
if ($fuser->email) print '
'.$langs->trans("SendNewPassword").'';