Fix groups et contacts par api
This commit is contained in:
parent
5898ef8d3f
commit
60db1ac833
|
@ -79,6 +79,7 @@
|
||||||
unset($contacts[$key]);
|
unset($contacts[$key]);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
$contact = $contact[0];
|
||||||
|
|
||||||
$contacts[$key] = $contact['id'];
|
$contacts[$key] = $contact['id'];
|
||||||
}
|
}
|
||||||
|
@ -86,11 +87,12 @@
|
||||||
//Pour chaque groupe, on récupère l'id du groupe
|
//Pour chaque groupe, on récupère l'id du groupe
|
||||||
foreach ($groups as $key => $name)
|
foreach ($groups as $key => $name)
|
||||||
{
|
{
|
||||||
if ($group = $db->getFromTableWhere('groups', ['name' => $name]))
|
if (!$group = $db->getFromTableWhere('groups', ['name' => $name]))
|
||||||
{
|
{
|
||||||
unset($groups[$key]);
|
unset($groups[$key]);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
$group = $group[0];
|
||||||
|
|
||||||
$groups[$key] = $group['id'];
|
$groups[$key] = $group['id'];
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue