X-Git-Url: http://git.shiar.nl/minimedit.git/blobdiff_plain/354851302f45fa8b12a15b6f610a32f79cdac450..8da4e3db153de18c026cc8dda79bdc0947663c8a:/login/post/index.php
diff --git a/login/post/index.php b/login/post/index.php
index c3439a1..0beb42f 100644
--- a/login/post/index.php
+++ b/login/post/index.php
@@ -1,5 +1,11 @@
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");
}
@@ -21,3 +27,8 @@ if ( $password = trim(@file_get_contents("{$user->dir}/.passwd")) ) {
}
$Place['pass'] = htmlspecialchars($password) ?: 'zelf ingesteld';
}
+else {
+ $Place['pass'] = 'onbekend';
+}
+
+print ''."\n";