diff --git a/htdocs/hrm/class/evaluation.class.php b/htdocs/hrm/class/evaluation.class.php index be26c853199..4144add377c 100644 --- a/htdocs/hrm/class/evaluation.class.php +++ b/htdocs/hrm/class/evaluation.class.php @@ -171,7 +171,7 @@ class Evaluation extends CommonObject */ public function __construct(DoliDB $db) { - global $conf, $langs, $user; + global $langs, $user; $this->db = $db; @@ -185,8 +185,8 @@ class Evaluation extends CommonObject $this->fields['entity']['enabled'] = 0; } - if (!$user->hasRight('hrm', 'evaluation', 'readall')) { - $this->fields['fk_user']['type'] .= ':rowid IN('.$this->db->sanitize(implode(", ", $user->getAllChildIds(1))).')'; + if (!$user->hasRight('hrm', 'evaluation', 'readall') || 1) { + $this->fields['fk_user']['type'] .= ':t.rowid:IN:'.$this->db->sanitize(implode(",", $user->getAllChildIds(1))); } $this->date_eval = dol_now();