public static function getConsultantProteges($consultant_id) { $proteges = User::getProtege(); $consultant_code = User::getCode($consultant_id); $response = array(); foreach ($proteges as $protege) { $protege_id = $protege->ID; $protege_code = User::getConsultantCode($protege_id); if ($protege_code === $consultant_code) { array_push($response, $protege_id); } } return $response; }