diff --git a/htdocs/core/class/html.form.class.php b/htdocs/core/class/html.form.class.php
index dcebb3328e0..7a26d64f5df 100644
--- a/htdocs/core/class/html.form.class.php
+++ b/htdocs/core/class/html.form.class.php
@@ -2600,10 +2600,10 @@ class Form
$sql .= " OR rowid IN (".$this->db->sanitize(implode(',', $selected)).")"; // We must always keep the selected users to avoid to loose it/them when updating
$sql .= ")";
}
- if (getDolGlobalString('USER_HIDE_NONEMPLOYEE_IN_COMBOBOX') || $notdisabled) {
+ if (getDolGlobalString('USER_HIDE_NONEMPLOYEE_IN_COMBOBOX')) {
$sql .= " AND u.employee <> 0";
}
- if (getDolGlobalString('USER_HIDE_EXTERNAL_IN_COMBOBOX') || $notdisabled) {
+ if (getDolGlobalString('USER_HIDE_EXTERNAL_IN_COMBOBOX')) {
$sql .= " AND u.fk_soc IS NULL";
}
if (!empty($morefilter)) {