diff --git a/htdocs/user/group/card.php b/htdocs/user/group/card.php index 3cce6710f7f..f698d1b5a07 100644 --- a/htdocs/user/group/card.php +++ b/htdocs/user/group/card.php @@ -217,8 +217,8 @@ if (empty($reshook)) { if (!empty($conf->multicompany->enabled) && !empty($conf->global->MULTICOMPANY_TRANSVERSE_MODE)) { $object->entity = 0; - } else { - $object->entity = GETPOSTISSET("entity") ? GETPOST("entity") : $conf->entity; + } elseif (GETPOSTISSET("entity")) { + $object->entity = GETPOST("entity", "int"); } $ret = $object->update();