Don't always redirect to dashboard on login
This commit is contained in:
parent
1ad71b33e2
commit
e5bf2a91fc
@ -28,7 +28,7 @@ function mod_page($title, $template, $args, $subtitle = false) {
|
||||
);
|
||||
}
|
||||
|
||||
function mod_login() {
|
||||
function mod_login($redirect = false) {
|
||||
global $config;
|
||||
|
||||
$args = array();
|
||||
@ -49,6 +49,9 @@ function mod_login() {
|
||||
// Set cookies
|
||||
setCookies();
|
||||
|
||||
if ($redirect)
|
||||
header('Location: ?' . $redirect, true, $config['redirect_http']);
|
||||
else
|
||||
header('Location: ?/', true, $config['redirect_http']);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user