diff --git a/htdocs/user/class/user.class.php b/htdocs/user/class/user.class.php index f83d991fccd..a5a81b48869 100644 --- a/htdocs/user/class/user.class.php +++ b/htdocs/user/class/user.class.php @@ -749,6 +749,7 @@ class User extends CommonObject { dol_syslog(get_class($this)."::clearrights reset user->rights"); $this->rights=''; + $this->nb_rights=0; $this->all_permissions_are_loaded=false; $this->_tab_loaded=array(); } diff --git a/htdocs/user/perms.php b/htdocs/user/perms.php index 17666183319..340b42aa1ac 100644 --- a/htdocs/user/perms.php +++ b/htdocs/user/perms.php @@ -97,6 +97,9 @@ if (empty($reshook)) { $user->getrights(); $menumanager->loadMenu(); } + + $object->clearrights(); + $object->getrights(); } if ($action == 'delrights' && $caneditperms) { @@ -110,6 +113,9 @@ if (empty($reshook)) { $user->getrights(); $menumanager->loadMenu(); } + + $object->clearrights(); + $object->getrights(); } } @@ -266,9 +272,9 @@ if (($caneditperms && empty($objMod->rights_admin_allowed)) || empty($object->ad if ($caneditperms) { print ''; - print ''.$langs->trans("All").""; + print ''.$langs->trans("All").""; print '/'; - print ''.$langs->trans("None").""; + print ''.$langs->trans("None").""; print ''; } print ' ';