Merge branch 'prod' into homeV2
This commit is contained in:
commit
1f211d5348
@ -659,7 +659,8 @@ function materio_user_get_role_by_name($name) {
|
|||||||
* Associative array containing the send result, including the status.
|
* Associative array containing the send result, including the status.
|
||||||
*/
|
*/
|
||||||
function materio_user_mandrill_mailsend_result($result) {
|
function materio_user_mandrill_mailsend_result($result) {
|
||||||
if ( in_array($result['status'], array('rejected', 'invalid', 'error')) ) {
|
$status = $result['status'];
|
||||||
|
if ( in_array($status, array('rejected', 'invalid', 'error')) ) {
|
||||||
$email = $result['email'];
|
$email = $result['email'];
|
||||||
|
|
||||||
// remove email from pool
|
// remove email from pool
|
||||||
@ -667,7 +668,7 @@ function materio_user_mandrill_mailsend_result($result) {
|
|||||||
simplenews_delete_spool(array('mail'=>$email));
|
simplenews_delete_spool(array('mail'=>$email));
|
||||||
watchdog("materio_user", "@mail rejected by mandrill, removed from simplenews spool", array("@mail"=>$email));
|
watchdog("materio_user", "@mail rejected by mandrill, removed from simplenews spool", array("@mail"=>$email));
|
||||||
|
|
||||||
if ( in_array($result['status'], array('invalid')) ) {
|
if ( in_array($status, array('invalid')) ) {
|
||||||
// unsubscribe user if mail does not exists
|
// unsubscribe user if mail does not exists
|
||||||
$subscriber = simplenews_subscriber_load_by_mail($email);
|
$subscriber = simplenews_subscriber_load_by_mail($email);
|
||||||
if ($subscriber) {
|
if ($subscriber) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user