You are here

function subscriptions_user_update in Subscriptions 2.0.x

Same name in this branch
  1. 2.0.x subscriptions.module \subscriptions_user_update()
  2. 2.0.x subscriptions.module.old.php \subscriptions_user_update()
Same name and namespace in other branches
  1. 7 subscriptions.module \subscriptions_user_update()

Implements hook_user_update().

Suspend notifications if the user is blocked.

Parameters

array $edit:

object $account:

null $category:

File

./subscriptions.module.old.php, 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);
  }
}