Regenerate and send user password

Hello
i have 2 dolibarr both version are 17.0.2
Initial install version for first one 16.0.4 and Initial install version for second one 16.0.3

in the first dolibarr i cannot see Regenerate and send password but in the second one i can see it

howto fix first one to show Regenerate and send password button?
Thanks


Hello :slight_smile:

in user/card.php, here is the portion of code concerning these buttons

So you must check
→ the USER_PASSWORD_GENERATED constant
→ your user’s rights concerning the user module
→ eventually the MULTI_COMPANY parameters…

Good continuation

Hello
it the same
if ($conf->global->USER_PASSWORD_GENERATED != ‘none’) {
if ($object->statut == 0) {
$params[‘attr’][‘title’] = $langs->trans(‘UserDisabled’);
print dolGetButtonAction($langs->trans(‘ReinitPassword’), ‘’, ‘default’, $_SERVER[‘PHP_SELF’].‘#’, ‘’, false, $params);
} elseif (($user->id != $id && $caneditpassword) && $object->login && !$object->ldap_sid &&
((!isModEnabled(‘multicompany’) && $object->entity == $user->entity) || !$user->entity || ($object->entity == $conf->entity) || ($conf->global->MULTICOMPANY_TRANSVERSE_MODE && $object->entity == 1))) {
print dolGetButtonAction($langs->trans(‘ReinitPassword’), ‘’, ‘default’, $_SERVER[‘PHP_SELF’].‘?id=’.$object->id.‘&action=password&token=’.newToken(), ‘’, true, $params);
}