function _notify_user_has_subscriptions in Notify 1.0.x
Same name and namespace in other branches
- 8 notify.module \_notify_user_has_subscriptions()
- 7 notify.module \_notify_user_has_subscriptions()
Helper function to check whether user has custom subscriptions.
3 calls to _notify_user_has_subscriptions()
- UserSettings::buildForm in src/
Form/ UserSettings.php - Form constructor.
- UserSettings::submitForm in src/
Form/ UserSettings.php - Form submission handler.
- _notify_send in ./
notify.module - Helper function to send the notification e-mail batch.
File
- ./
notify.module, line 465 - Notify module sends e-mail digests of new content and comments.
Code
function _notify_user_has_subscriptions($userprofile) {
$field = \Drupal::database()
->select('notify_subscriptions', 'n')
->fields('n', array(
'uid',
))
->condition('uid', $userprofile)
->execute()
->fetchObject();
$subscriber = $field ? TRUE : FALSE;
return $subscriber;
}