You are here

function _subscriptions_user_suspend in Subscriptions 7

Same name and namespace in other branches
  1. 2.0.x subscriptions.admin.old.php \_subscriptions_user_suspend()

Update the user's suspend state.

Parameters

int $uid:

int $suspend:

2 calls to _subscriptions_user_suspend()
subscriptions_user_update in ./subscriptions.module
Implements hook_user_update().
_subscriptions_user_suspend_form_submit in ./subscriptions.admin.inc
User suspend subform submit handler.

File

./subscriptions.admin.inc, line 526
Subscriptions module (load-on-demand admin functions).

Code

function _subscriptions_user_suspend($uid, $suspended) {
  db_update('subscriptions_user')
    ->fields(array(
    'suspended' => $suspended,
  ))
    ->condition('uid', $uid)
    ->execute();
  db_update('subscriptions_queue')
    ->fields(array(
    'suspended' => $suspended,
  ))
    ->condition('uid', $uid)
    ->execute();
}