From 40a3f70eb35d6df2a5a5e57bc4d7b84b759c4e39 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sun, 19 Dec 2021 17:12:01 +0100 Subject: [PATCH] FIx #19638 --- htdocs/user/card.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/user/card.php b/htdocs/user/card.php index 1f964faefa5..73d97d1a3fc 100644 --- a/htdocs/user/card.php +++ b/htdocs/user/card.php @@ -1855,14 +1855,14 @@ if ($action == 'create' || $action == 'adduserldap') { if ($conf->global->USER_PASSWORD_GENERATED != 'none') { if ($object->statut == 0) { print '
'.$langs->trans("ReinitPassword").'
'; - } elseif (($user->id != $id && $caneditpassword) && $object->login && !$object->ldap_sid && + } elseif ($caneditpassword && $object->login && !$object->ldap_sid && ((empty($conf->multicompany->enabled) && $object->entity == $user->entity) || !$user->entity || ($object->entity == $conf->entity) || ($conf->global->MULTICOMPANY_TRANSVERSE_MODE && $conf->entity == 1))) { print '
'.$langs->trans("ReinitPassword").'
'; } if ($object->statut == 0) { print '
'.$langs->trans("SendNewPassword").'
'; - } elseif (($user->id != $id && $caneditpassword) && $object->login && !$object->ldap_sid && + } elseif ($caneditpassword && $object->login && !$object->ldap_sid && ((empty($conf->multicompany->enabled) && $object->entity == $user->entity) || !$user->entity || ($object->entity == $conf->entity) || ($conf->global->MULTICOMPANY_TRANSVERSE_MODE && $conf->entity == 1))) { if ($object->email) { print '
'.$langs->trans("SendNewPassword").'
';