function subscriptions_user_update in Subscriptions 7
Same name and namespace in other branches
- 2.0.x subscriptions.module \subscriptions_user_update()
- 2.0.x subscriptions.module.old.php \subscriptions_user_update()
Implements hook_user_update().
Suspend notifications if the user is blocked.
Parameters
array $edit:
object $account:
null $category:
File
- ./
subscriptions.module, line 360 - Subscriptions module.
Code
function subscriptions_user_update(&$edit, $account, $category) {
if ($account->status === '0' && $account->original->status === '1') {
// User is being blocked.
_subscriptions_module_load_include('subscriptions', 'admin.inc');
_subscriptions_user_suspend($account->uid, 2);
}
}