You are here

function subscriptions_suspended in Subscriptions 2.0.x

Same name and namespace in other branches
  1. 6 subscriptions.module \subscriptions_suspended()
  2. 7 subscriptions.module \subscriptions_suspended()

Returns whether notifications are suspended for the given user, and optionally alerts the user if delivery is suspended.

Parameters

int $uid:

bool $alert:

Return value

bool

4 calls to subscriptions_suspended()
old_subscriptions_ui_node_view in subscriptions_ui/subscriptions_ui.module
Implements hook_node_view().
subscriptions_form_user_profile_form_alter in ./subscriptions.module.old.php
Implements hook_form_alter().
subscriptions_page_form in ./subscriptions.admin.old.php
Display subscribed content data on the user and site subscriptions pages. @ TODO clean up all of these parts
subscriptions_user_suspend_form in ./subscriptions.admin.old.php
Returns the form definition for the suspend part of the overview page.

File

./subscriptions.module.old.php, line 966
Subscriptions module.

Code

function subscriptions_suspended($uid, $alert = FALSE) {

  /** @var $result bool */
  $result = db_query("SELECT suspended FROM {subscriptions_user} WHERE uid = :uid", array(
    ':uid' => $uid,
  ))
    ->fetchField();
  if ($result && $alert && empty($_POST)) {
    _subscriptions_module_load_include('subscriptions', 'admin.inc');
    _subscriptions_suspended_alert($uid, $result);
  }
  return $result;
}