X-Git-Url: http://git.shiar.net/minimedit.git/blobdiff_plain/b3aec6cf1cd18493d44cf68d88c8f55b6a417f9c..17653d5b7ab2c7276c97b0953648fcb885383711:/login/post/index.php diff --git a/login/post/index.php b/login/post/index.php index 9578d3c..0beb42f 100644 --- a/login/post/index.php +++ b/login/post/index.php @@ -1,5 +1,11 @@ admin('user') and $username = @$_REQUEST['login']) { +if (!$User->login) { + http_response_code(303); + $target = urlencode($_SERVER['REQUEST_URI']); + header("Location: /login?goto=$target"); + exit; +} +elseif ($User->admin('user') and $username = @$_REQUEST['login']) { try { $user = new User("profile/$username"); } @@ -25,4 +31,4 @@ else { $Place['pass'] = 'onbekend'; } -print ''."\n"; +print ''."\n";