function subscriptions_suspended in Subscriptions 7
Same name and namespace in other branches
- 6 subscriptions.module \subscriptions_suspended()
- 2.0.x subscriptions.module.old.php \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()
- subscriptions_form_user_profile_form_alter in ./
subscriptions.module - Implements hook_form_alter().
- subscriptions_page_form in ./
subscriptions.admin.inc - Display subscribed content data on the user and site subscriptions pages. @ TODO clean up all of these parts
- subscriptions_ui_node_view in ./
subscriptions_ui.module - Implements hook_node_view().
- subscriptions_user_suspend_form in ./
subscriptions.admin.inc - Returns the form definition for the suspend part of the overview page.
File
- ./
subscriptions.module, 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;
}