This commit is contained in:
Laurent Destailleur 2021-09-15 19:58:55 +02:00
parent 801bf83334
commit 5aaf8ff8f3
2 changed files with 3 additions and 3 deletions

View File

@ -392,7 +392,7 @@ class ConferenceOrBoothAttendee extends CommonObject
* @param string $sortfield Sort field
* @param int $limit limit
* @param int $offset Offset
* @param array $filter Filter array. Example array('field'=>'valueforlike', 'customurl'=>...)
* @param array $filter Filter array. Example array('field'=>'valueforlike', 'customurl'=>...). WARNING: customerurl must be a sanitized SQL string.
* @param string $filtermode Filter mode (AND or OR)
* @return array|int int <0 if KO, array of pages if OK
*/

View File

@ -251,10 +251,10 @@ if (empty($reshook) && $action == 'add' && (!empty($conference->id) && $conferen
$confattendee = new ConferenceOrBoothAttendee($db);
if ($type == 'global') {
$filter = array('t.fk_project'=>$id, 'customsql'=>'t.email="'.$email.'"');
$filter = array('t.fk_project'=>((int) $id), 'customsql'=>'t.email="'.$db->escape($email).'"');
}
if ($action == 'conf') {
$filter = array('t.fk_actioncomm'=>$id, 'customsql'=>'t.email="'.$email.'"');
$filter = array('t.fk_actioncomm'=>((int) $id), 'customsql'=>'t.email="'.$db->escape($email).'"');
}
// Check if there is already an attendee into table eventorganization_conferenceorboothattendee for same event (or conference/booth)