public function getNotificationsSince($UserID, $LastActivityID, $FilterToActivityTypeIDs = '', $Limit = 5)
{
$this->activityQuery();
$this->fireEvent('BeforeGetNotificationsSince');
if (is_array($FilterToActivityTypeIDs)) {
$this->SQL->whereIn('a.ActivityTypeID', $FilterToActivityTypeIDs);
} else {
$this->SQL->where('t.Notify', '1');
}
$Result = $this->SQL->where('RegardingUserID', $UserID)->where('a.ActivityID >', $LastActivityID)->limit($Limit, 0)->orderBy('a.ActivityID', 'desc')->get();
return $Result;
}