function _securesite_request_form in Secure Site 5
Same name and namespace in other branches
- 6 securesite.inc \_securesite_request_form()
Returns complete form for password reset request (if enabled)
Return value
HTML used in the Secure Site dialog when the HTTP Auth dialog is cancelled
1 call to _securesite_request_form()
- _securesite_user_auth in ./
securesite.module - Display authentication dialog and send password reset mails
File
- ./
securesite.inc, line 32 - Support functions for the Secure Site contrib module
Code
function _securesite_request_form() {
$securesite_enabled = variable_get('securesite_enabled', SECURESITE_DISABLED);
$output = '';
if ($form_msg = variable_get('securesite_request_form', t('<p>Enter your username or e-mail address.</p>'))) {
if ($securesite_enabled == SECURESITE_FORM) {
// Only output the HR if also outputting the login form
$output = " <hr>\n\n ";
}
$output .= "\n <h1>" . t('Password Reset') . '</h1>
<div id="reset">' . $form_msg . '</div>
' . theme('status_messages') . '
<form action="' . request_uri() . '" method="post">
<p><label>' . t('Username') . ': <input type="text" maxlength="55" class="form-text" name="edit[name]" id="edit-name" value=""></label></p>
<p><label>' . t('E-mail address') . ': <input type="text" maxlength="64" class="form-text" name="edit[mail]" id="edit-mail" value=""></label></p>
<p><input type="hidden" name="securesite_request_form" value="1"><input type="submit" class="form-submit" name="op" value="' . t('Reset password') . '"></p>
</form>
';
}
else {
if ($securesite_enabled == SECURESITE_AUTH) {
// If password reset is disabled and the login form isn't being used,
// output a message to the user informing them how to login
$output = theme('status_messages') . '<p id="password">' . t('Reload the page to try logging in again.') . "</p>\n";
}
}
return $output;
}