You are here

function sms_user_settings_confirm_form in SMS Framework 7

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

Form constructor for the user number code verification form.

Parameters

object $account: The user account object.

See also

sms_user_settings_confirm_form_validate()

sms_user_settings_confirm_form_submit()

1 string reference to 'sms_user_settings_confirm_form'
sms_user_settings in modules/sms_user/sms_user.module
Menu callback for user profile settings form.

File

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

Code

function sms_user_settings_confirm_form($form, &$form_state, $account) {
  $form['uid'] = array(
    '#type' => 'hidden',
    '#value' => $account->uid,
  );
  $form['number'] = array(
    '#type' => 'item',
    '#title' => t('Mobile phone number'),
    '#markup' => $account->sms_user['number'],
  );
  $form['confirm_code'] = array(
    '#type' => 'textfield',
    '#title' => t('Confirmation code'),
    '#description' => t('Enter the confirmation code sent by SMS to your mobile phone.'),
    '#size' => 4,
    '#maxlength' => 4,
  );
  $form['submit'] = array(
    '#type' => 'submit',
    '#value' => t('Confirm number'),
  );
  $form['reset'] = array(
    '#type' => 'submit',
    '#value' => t('Delete & start over'),
    '#access' => user_access('edit own sms number'),
  );
  $form['confirm'] = array(
    '#type' => 'submit',
    '#value' => t('Confirm without code'),
    '#access' => user_access('administer smsframework'),
  );
  return $form;
}