created materio_user_rules module
This commit is contained in:
26
materio_user_rules.module
Normal file
26
materio_user_rules.module
Normal file
@@ -0,0 +1,26 @@
|
||||
<?php
|
||||
|
||||
|
||||
/**
|
||||
* Implement hook_user()
|
||||
*
|
||||
*/
|
||||
function materio_user_rules_user_update(&$edit, $account) {
|
||||
if (!empty($account->logintoboggan_email_validated)) {
|
||||
$subscritpions = ;
|
||||
rules_invoke_event('materio_logintoboggan_validated', $account, $subscritpions);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Implements hook_simplenews_unsubscribe_user().
|
||||
*/
|
||||
function materio_user_rules_simplenews_subscribe_user($subscriber, $subscription) {
|
||||
if (!empty($subscriber->logintoboggan_email_validated)) {
|
||||
$args = array(
|
||||
'mail' => $subscriber->mail,
|
||||
'tid' => $subscription->tid,
|
||||
);
|
||||
rules_invoke_event_by_args('simplenews_rules_event_subscribe', $args);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user