e9db8f4b by Kevin Burton

updated notifications to use the WP user_email

1 parent 320fb3f8
......@@ -177,6 +177,8 @@ function remove_notice($notification_id = -1) {
@trigger = notification unique slug name
*/
function send_triggered_notification($uid,$trigger="NO_TRIGGER",$args = array(),$send_override = false) {
$notification = get_notification_by_trigger($trigger);
if($notification) {
......@@ -186,7 +188,7 @@ function send_triggered_notification($uid,$trigger="NO_TRIGGER",$args = array(),
$notify_me = get_user_meta($user->ID,'notify_me',true);
$notify_format = get_user_meta($user->ID,'notify_format',true);
$email_preference = get_user_meta($user->ID,'email_address_preference',true);
$cell = get_user_meta($user->ID,'home_mobile',true);
$cell = get_user_meta($user->ID,'mobile',true);
}
// get the notification and notificatio details....
......@@ -248,8 +250,9 @@ function send_email($uid, $contents,$args) {
if ($uid > 0) {
$user = new WP_User($uid);
$to_email = $user->user_email;//get_user_meta($uid,'home_email',true);
/*
$preference = get_user_meta($uid, 'email_address_preference',true);
if ($preference == "Home") {
......@@ -263,6 +266,7 @@ function send_email($uid, $contents,$args) {
if (!(boolean)filter_var($to_email, FILTER_VALIDATE_EMAIL)) {
$to_email = $user->user_email;
}
*/
......