mirror of
https://github.com/phpbb/phpbb.git
synced 2025-08-06 00:37:42 +02:00
Enable redirect after login
git-svn-id: file:///svn/phpbb/trunk@4768 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
@@ -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,
|
||||
|
Reference in New Issue
Block a user