X-Git-Url: http://git.shiar.nl/minimedit.git/blobdiff_plain/3a4f1ae1a32baa3658d54c3dadf268bab01308a2..42a4b445cf00c094dfa97b8679901588371188e6:/login/post/index.php diff --git a/login/post/index.php b/login/post/index.php index 9578d3c..747683f 100644 --- a/login/post/index.php +++ b/login/post/index.php @@ -1,5 +1,11 @@ admin('user') and $username = @$_REQUEST['login']) { +if (!$User) { + 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"); }