diff --git a/admin/communication.php b/admin/communication.php index 084123e..4a738c2 100644 --- a/admin/communication.php +++ b/admin/communication.php @@ -288,6 +288,8 @@ case 'dialog_edit': + + @@ -657,24 +659,16 @@ case "email_get_list": "SALUTATION"=>$u['salutation'], "FIRSTNAME"=>$u['firstname'], "LASTNAME"=>$u['lastname'], - "NAME"=>$u['firstname']." ".$u['lastname'], + "NAME"=>$u['name'], "EMAIL"=>$u['email'], "ORGANIZATION"=>$u['sponsor']['organization'] ); - if($u['firstname'] && $u['lastname']) - $toname=$u['firstname']." ".$u['lastname']; - else if($u['firstname']) - $toname=$u['firstname']; - else if($u['lastname']) - $toname=$u['lastname']; - $toemail=$u['email']; - - if($toemail) { + if($u['email']) { mysql_query("INSERT INTO emailqueue_recipients (emailqueue_id,toemail,toname,replacements,sent) VALUES ( '$emailqueueid', - '".mysql_real_escape_string($toemail)."', - '".mysql_real_escape_string($toname)."', + '".mysql_real_escape_string($u['email'])."', + '".mysql_real_escape_string($u['name'])."', '".json_encode($replacements)."', NULL)"); echo mysql_error(); @@ -811,18 +805,12 @@ case "email_get_list": "SALUTATION"=>$u['salutation'], "FIRSTNAME"=>$u['firstname'], "LASTNAME"=>$u['lastname'], - "NAME"=>$u['firstname']." ".$u['lastname'], + "NAME"=>$u['name'], "EMAIL"=>$u['email'], "ORGANIZATION"=>$u['sponsor']['organization'] ); - if($u['firstname'] && $u['lastname']) - $toname=$u['firstname']." ".$u['lastname']; - else if($u['firstname']) - $toname=$u['firstname']; - else if($u['lastname']) - $toname=$u['lastname']; - + $toname=$u['name']; $toemail=$u['email']; }