diff --git a/htdocs/user/document.php b/htdocs/user/document.php index 8cf6c2b2a81..a5d88d04c5d 100644 --- a/htdocs/user/document.php +++ b/htdocs/user/document.php @@ -60,6 +60,9 @@ if ($id) { || (($user->id != $id) && $user->rights->user->user->password)); } +$permissiontoadd = $caneditfield; +$permtoedit = $caneditfield; + // Security check $socid = 0; if ($user->socid > 0) { @@ -174,10 +177,7 @@ if ($object->id) { print dol_get_fiche_end(); - $modulepart = 'user'; - $permissiontoadd = $user->rights->user->user->creer; - $permtoedit = $user->rights->user->user->creer; $param = '&id='.$object->id; include DOL_DOCUMENT_ROOT.'/core/tpl/document_actions_post_headers.tpl.php'; } else {