* Calendar - Filter birthdays by name to remove duplicates caused by account + contact

This commit is contained in:
nathangray 2018-02-16 09:29:26 -07:00
parent c9dcbc0947
commit 228629f93f

View File

@ -1908,7 +1908,12 @@ class calendar_bo
{
$holidays[$date] = array();
}
$holidays[$date] = array_merge($holidays[$date], $bdays);
foreach($bdays as $birthday)
{
// Skip if name / date are already there - duplicate contacts
if(in_array($birthday['name'], array_column($holidays[$date], 'name'))) continue;
$holidays[$date][] = $birthday;
}
}
}
}