grrrrr
This commit is contained in:
parent
be2054c163
commit
31ede7287a
@ -658,22 +658,21 @@ function materio_user_get_role_by_name($name) {
|
|||||||
* @param array $result
|
* @param array $result
|
||||||
* 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')) ) {
|
if ( in_array($result['status'], array('rejected', 'invalid', 'error')) ) {
|
||||||
// // remove email from pool
|
// remove email from pool
|
||||||
// simplenews_delete_spool(['mail'=>$result['email']]);
|
simplenews_delete_spool(['mail'=>$result['email']]);
|
||||||
|
|
||||||
|
if ( in_array($result['status'], array('invalid')) ) {
|
||||||
// if ( in_array($result['status'], array('invalid')) ) {
|
// unsubscribe user if mail does not exists
|
||||||
// // unsubscribe user if mail does not exists
|
$subscriber = simplenews_subscriber_load_by_mail($result['email']);
|
||||||
// $subscriber = simplenews_subscriber_load_by_mail($result['email']);
|
if ($subscriber) {
|
||||||
// if ($subscriber) {
|
simplenews_subscriber_delete($subscriber);
|
||||||
// simplenews_subscriber_delete($subscriber);
|
}
|
||||||
// }
|
// disable user
|
||||||
// // disable user
|
$user = user_load_by_mail($result['email']);
|
||||||
// $user = user_load_by_mail($result['email']);
|
$user->status = 0;
|
||||||
// $user->status = 0;
|
user_save($user->uid);
|
||||||
// user_save($user->uid);
|
}
|
||||||
// }
|
}
|
||||||
// }
|
}
|
||||||
// }
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user