function sms_user_sms_send in SMS Framework 5
Same name and namespace in other branches
- 6.2 modules/sms_user/sms_user.module \sms_user_sms_send()
- 6 modules/sms_user/sms_user.module \sms_user_sms_send()
- 7 modules/sms_user/sms_user.module \sms_user_sms_send()
Implementation of hook_sms_send().
File
- modules/
sms_user/ sms_user.module, line 83 - Provides integration between the SMS Framework and Drupal users.
Code
function sms_user_sms_send(&$number, &$message, &$options, &$gateway) {
if (variable_get('sms_user_sleep', 1) && ($uid = sms_user_get_uid($number))) {
$account = user_load(array(
'uid' => $uid,
'status' => 1,
));
if (!empty($account->sms_user['sleep_enabled']) && _sms_user_sleep_active($account)) {
unset($gateway['send']);
watchdog('sms', t('Message was not sent to @user due to sleep settings.', array(
'@user' => $account->name,
)));
}
}
}