You are here

function sms_user_send in SMS Framework 6

Same name and namespace in other branches
  1. 5 modules/sms_user/sms_user.module \sms_user_send()
  2. 6.2 modules/sms_user/sms_user.module \sms_user_send()
  3. 7 modules/sms_user/sms_user.module \sms_user_send()

Send a message to a user.

2 calls to sms_user_send()
sms_actions_send_action in modules/sms_actions/sms_actions.module
Implementation of a Drupal action.
sms_blast_form_submit in modules/sms_blast/sms_blast.module
Submit handler for the sms blast form

File

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

Code

function sms_user_send($uid, $message) {
  $account = user_load($uid);
  if ($account->sms_user[0]['status'] == 2) {
    return sms_send($account->sms_user[0]['number'], $message, $account->sms_user[0]['gateway']);
  }
  else {
    return FALSE;
  }
}