You are here

function sms_user_send in SMS Framework 5

Same name and namespace in other branches
  1. 6.2 modules/sms_user/sms_user.module \sms_user_send()
  2. 6 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.

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;
  }
}