You are here

function sms_user_send_confirmation in SMS Framework 6

Same name and namespace in other branches
  1. 5 modules/sms_user/sms_user.module \sms_user_send_confirmation()
  2. 6.2 modules/sms_user/sms_user.module \sms_user_send_confirmation()
  3. 7 modules/sms_user/sms_user.module \sms_user_send_confirmation()
2 calls to sms_user_send_confirmation()
sms_user_settings_add_form_submit in modules/sms_user/sms_user.module
sms_user_user in modules/sms_user/sms_user.module
Implmentation of hook_user().

File

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

Code

function sms_user_send_confirmation($account, $number, $options) {
  $code = rand(1000, 9999);
  $number = sms_formatter($number);
  $data[0] = array(
    'number' => $number,
    'status' => SMS_USER_PENDING,
    'code' => $code,
    'gateway' => $options,
  );
  user_save($account, array(
    'sms_user' => $data,
  ), 'mobile');
  sms_send($number, _sms_user_confirm_message($code), $options);
}