checkResetPasswordCode($_GET['email'], $_GET['code']); if ($authorized === false) { // bad code triggerError('There was an error processing your request.'); } $bad_input = false; $success = false; if (array_key_exists('password', $_POST) && array_key_exists('passwordconfirm', $_POST) && !empty($_POST['password'])) { if ($_POST['password'] != $_POST['passwordconfirm']) { $bad_input = true; } if ($bad_input === false) { $user->setPassword($_POST['password']); $success = true; } } // Assign template variables. $tpl->assign( array( 'title' => 'Firefox Add-ons Password Recovery', 'currentTab' => null, 'bad_input' => $bad_input, 'success' => $success ) ); ?>