function _notify_user_has_subscriptions in Notify 7
Same name and namespace in other branches
- 8 notify.module \_notify_user_has_subscriptions()
 - 1.0.x notify.module \_notify_user_has_subscriptions()
 
Helper function to check whether user has custom subscriptions.
3 calls to _notify_user_has_subscriptions()
- notify_user_settings_form in ./
notify.admin.inc  - Menu callback; show user notification options.
 - notify_user_settings_form_submit in ./
notify.admin.inc  - Submit for the notify_user_settings form.
 - _notify_send in ./
notify.module  - Helper function to send the notification e-mail batch.
 
File
- ./
notify.module, line 421  - Notify module sends e-mail digests of new content and comments.
 
Code
function _notify_user_has_subscriptions($uid) {
  $field = db_query('SELECT uid FROM {notify_subscriptions} WHERE uid = :uid', array(
    ':uid' => $uid,
  ))
    ->fetchObject();
  $subscriber = $field ? TRUE : FALSE;
  return $subscriber;
}