You are here

function sms_user_send_confirmation in SMS Framework 5

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

File

modules/sms_user/sms_user.module, line 282
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);
}