function tokenauth_reset_user_form in Token authentication 7
Same name and namespace in other branches
- 6.2 tokenauth.inc \tokenauth_reset_user_form()
- 6 tokenauth.inc \tokenauth_reset_user_form()
Helper function to build a token reset form.
1 call to tokenauth_reset_user_form()
- tokenauth_user_profile_form in ./tokenauth.pages.inc 
- Menu callback. Prints the token and instructions.
File
- ./tokenauth.inc, line 138 
- Provides tokenauth API for Token Authentication module.
Code
function tokenauth_reset_user_form($uid, $label = NULL, $token = NULL) {
  $form = array();
  $form['uid'] = array(
    '#type' => 'value',
    '#value' => $uid,
  );
  $form['tokenauth'] = array(
    '#type' => 'value',
    '#value' => $token,
  );
  $form['submit'] = array(
    '#type' => 'submit',
    '#value' => isset($label) ? $label : t('Reset token'),
  );
  $form['#action'] = url('user/' . $uid . '/tokenauth/reset');
  $form['#method'] = 'get';
  return $form;
}