Code: Select all
if ($notifications_data === null)
{
$notifications_data = array(
array(
'item_type' => 'notification.type.post',
'method' => 'notification.method.email',
),
array(
'item_type' => 'notification.type.topic',
'method' => 'notification.method.email',
),
);
}
Instead of commenting/deleting the lines above replace with:
Code: Select all
// Use default notifications settings if notifications_data is not set
// Mod - Custom fields available on registration to set email notification preferences
if ($notifications_data === null)
{
$notifications_data = array();
if (isset($cp_data['pf_topic_notify']) && $cp_data['pf_topic_notify'] == 1 )
{
$notifications_data[] = array(
'item_type' => 'notification.type.post',
'method' => 'notification.method.email',
);
$notifications_data[] = array(
'item_type' => 'notification.type.topic',
'method' => 'notification.method.email',
);
}
if (isset($cp_data['pf_pm_notify']) && $cp_data['pf_pm_notify'] == 1)
{
$notifications_data[] = array(
'item_type' => 'notification.type.pm',
'method' => 'notification.method.email',
);
}
}