You are here

function _sms_user_sleep_active in SMS Framework 5

Same name and namespace in other branches
  1. 6.2 modules/sms_user/sms_user.module \_sms_user_sleep_active()
  2. 6 modules/sms_user/sms_user.module \_sms_user_sleep_active()
  3. 7 modules/sms_user/sms_user.module \_sms_user_sleep_active()
1 call to _sms_user_sleep_active()
sms_user_sms_send in modules/sms_user/sms_user.module
Implementation of hook_sms_send().

File

modules/sms_user/sms_user.module, line 94
Provides integration between the SMS Framework and Drupal users.

Code

function _sms_user_sleep_active($account) {
  $current_hour = date('G');
  if ($account->sms_user['sleep_start_time'] <= $current_hour && $account->sms_user['sleep_end_time'] > $current_hour) {
    return TRUE;
  }
  return FALSE;
}