You are here

function _faq_ask_get_faq_notifications in FAQ_Ask 7

Same name and namespace in other branches
  1. 6.2 faq_ask.module \_faq_ask_get_faq_notifications()

Helper function fetching all notifications

@TODO: optimise to query for all the relevant notifications = those who have a node that is published

Return value

array Array containing all outstanding notifications

1 call to _faq_ask_get_faq_notifications()
faq_ask_cron in ./faq_ask.module
Implements hook_cron().

File

./faq_ask.module, line 729
This module is an add-on to the FAQ module that allows users with the 'ask question' permission to create a question which will be queued for an 'expert' to answer.

Code

function _faq_ask_get_faq_notifications() {
  return db_select('faq_ask_notify', 'fa')
    ->fields('fa', array(
    'nid',
    'email',
  ))
    ->execute()
    ->fetchAllAssoc('nid');
}