You are here

function contact_save_unread_messages in Contact Save 7

Return the number of unread messages.

Return value

int Number of messages that have yet to be read.

2 calls to contact_save_unread_messages()
contact_save_user_login in ./contact_save.module
Implements hook_user_login().
contact_save_user_view in ./contact_save.module
Implements hook_user_view().

File

./contact_save.module, line 163
Contact save module logic.

Code

function contact_save_unread_messages() {
  return db_select('contact_save', 'cs')
    ->condition('cs.read', 0)
    ->countQuery()
    ->execute()
    ->fetchField();
}