function multiple_email_confirm_form in Multiple E-mail Addresses 7
Same name and namespace in other branches
- 5 multiple_email_confirm_page.inc \multiple_email_confirm_form()
- 6 multiple_email_confirm_page.inc \multiple_email_confirm_form()
- 2.x multiple_email_confirm_page.inc \multiple_email_confirm_form()
Builds e-mail confirmation form
Parameters
object $email:
string $confirm_code:
Return value
array
See also
multiple_email_confirm_form_submit()
1 string reference to 'multiple_email_confirm_form'
- multiple_email_confirm_page in ./
multiple_email_confirm_page.inc - Renders the page to confirm an e-mail address.
File
- ./
multiple_email_confirm_page.inc, line 51 - Functions for displaying and processing the confirmation page
Code
function multiple_email_confirm_form($form, &$form_state, $account, $email, $confirm_code) {
$form = array();
$form[] = array(
'#type' => 'markup',
'#markup' => '<p>' . t('The e-mail address %email is awaiting confirmation. You should have received an e-mail at that address with a confirmation code in it. Enter the code below and click confirm. If you have lost this e-mail or did not recieve a confirmation code you can try <a href="!resend">resending</a> it.', array(
'%email' => $email->email,
'!resend' => url('user/' . $account->uid . '/edit/email-addresses/confirm/' . $email->eid . '/resend'),
)) . '</p>',
);
$form['#email'] = $email;
$form['#account'] = $account;
$form['code'] = array(
'#type' => 'textfield',
'#title' => t('Confirmation Code'),
'#required' => TRUE,
'#default_value' => check_plain($confirm_code),
);
$form_state['#redirect'] = 'user/' . $account->uid . '/edit/email-addresses';
$form['submit'] = array(
'#type' => 'submit',
'#value' => t('Confirm'),
);
return $form;
}