mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-12-02 10:00:54 +00:00
fixed bugs 332825 and 332837
This commit is contained in:
parent
646734e578
commit
24a7af92ea
@ -54,10 +54,13 @@ if (!empty($_POST['username']) && !empty($_POST['password'])) {
|
||||
}
|
||||
}
|
||||
|
||||
$email_value = array_key_exists('username', $_POST) ? $_POST['username'] : '';
|
||||
|
||||
// Assign template variables.
|
||||
$tpl->assign(
|
||||
array( 'title' => 'Firefox Add-ons Login',
|
||||
'currentTab' => null,
|
||||
'email' => $email_value,
|
||||
'login_error' => $login_error
|
||||
)
|
||||
);
|
||||
|
@ -12,6 +12,10 @@ require_once 'includes.php';
|
||||
|
||||
$bad_input = false;
|
||||
$success = false;
|
||||
|
||||
// Give us a default value if it exists
|
||||
$email_value = array_key_exists('email', $_GET) ? $_GET['email'] : '';
|
||||
|
||||
if (array_key_exists('email', $_POST) && !empty($_POST['email'])) {
|
||||
$user = user::getUserByEmail($_POST['email']);
|
||||
if ($user === false) {
|
||||
@ -22,10 +26,10 @@ if (array_key_exists('email', $_POST) && !empty($_POST['email'])) {
|
||||
$user->sendPasswordRecoveryEmail();
|
||||
$success = true;
|
||||
}
|
||||
//override the get string
|
||||
$email_value = $_POST['email'];
|
||||
}
|
||||
|
||||
$email_value = array_key_exists('email', $_POST) ? $_POST['email'] : '';
|
||||
|
||||
// Assign template variables.
|
||||
$tpl->assign(
|
||||
array( 'title' => 'Firefox Add-ons Password Recovery',
|
||||
|
@ -3,14 +3,15 @@
|
||||
{if $login_error}
|
||||
<div>
|
||||
<p>You were not successfully logged in. Check your e-mail address and
|
||||
password and try again.</p>
|
||||
password and try again. If you've forgotten your password you can <a
|
||||
href="{$config.webpath}/recoverpassword.php?email={$email|escape}">recover it</a>.</p>
|
||||
</div>
|
||||
{/if}
|
||||
<form id="front-login" class="amo-form" method="post" action="" title="Login to Firefox Add-ons">
|
||||
|
||||
<div>
|
||||
<label class="amo-label-large" for="username" title="E-Mail Address">E-Mail Address:</label>
|
||||
<input id="username" name="username" type="text" accesskey="u" size="40"/>
|
||||
<input id="username" name="username" value="{$email|escape}" type="text" accesskey="u" size="40"/>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
|
Loading…
Reference in New Issue
Block a user