diff options
Diffstat (limited to 'phpBB/includes')
| -rw-r--r-- | phpBB/includes/functions.php | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/phpBB/includes/functions.php b/phpBB/includes/functions.php index 3ba26e68cc..e0f9655cc8 100644 --- a/phpBB/includes/functions.php +++ b/phpBB/includes/functions.php @@ -938,10 +938,12 @@ function login_box($s_action, $s_hidden_fields = '', $login_explain = '') $err = ''; if (isset($_POST['login'])) { - $autologin = (!empty($_POST['autologin'])) ? TRUE : FALSE; + $username = request_var('username', ''); + $password = request_var('password', ''); + $autologin = (!empty($_POST['autologin'])) ? TRUE : FALSE; $viewonline = (!empty($_POST['viewonline'])) ? 0 : 1; - if (($result = $auth->login($_POST['username'], $_POST['password'], $autologin, $viewonline)) === true) + if (($result = $auth->login($username, $password, $autologin, $viewonline)) === true) { // TODO // Force change password ... plugin for EVENT_LOGIN in future @@ -960,6 +962,8 @@ function login_box($s_action, $s_hidden_fields = '', $login_explain = '') $err = ($result === 0) ? $user->lang['ACTIVE_ERROR'] : $user->lang['LOGIN_ERROR']; } + $s_hidden_fields = (!empty($_SERVER['HTTP_REFERER'])) ? '<input type="hidden" name="redirect" value="' . htmlspecialchars($_SERVER['HTTP_REFERER']) . '" />' : ''; + $template->assign_vars(array( 'LOGIN_ERROR' => $err, 'LOGIN_EXPLAIN' => $login_explain, |
