X-Git-Url: http://git.shiar.nl/minimedit.git/blobdiff_plain/db34f863d9a47e768ac0ea9a00d1646dda069c09..da2d6e5537e9fdcd6f424ea1cc8ab6ef8f45727e:/login/post/index.php?ds=sidebyside diff --git a/login/post/index.php b/login/post/index.php index 9621978..c4dcffc 100644 --- a/login/post/index.php +++ b/login/post/index.php @@ -1,9 +1,9 @@ api) return; + +if (!$User->login) { $target = urlencode($_SERVER['REQUEST_URI']); - header("Location: /login?goto=$target"); - exit; + abort("/login?goto=$target", 303); } elseif ($User->admin('user') and $username = @$_REQUEST['login']) { try { @@ -13,22 +13,22 @@ elseif ($User->admin('user') and $username = @$_REQUEST['login']) { printf('

%s

', $e->getMessage()); return; } - $Article->title = $user->login . ': ' . $Article->title; + $Page->title = $user->login . ': ' . $Page->title; } else { $user = $User; } -$Place['login/name'] = $user->name ?: 'bewoner'; -$Place['user'] = $user->login; +$Page->place['login/name'] = $user->name ?: 'bewoner'; +$Page->place['user'] = $user->login; if ( $password = trim(@file_get_contents("{$user->dir}/.passwd")) ) { if (substr($password, 0, 1) == '$') { $password = NULL; // hashed } - $Place['pass'] = htmlspecialchars($password) ?: 'zelf ingesteld'; + $Page->place['pass'] = htmlspecialchars($password) ?: 'zelf ingesteld'; } else { - $Place['pass'] = 'onbekend'; + $Page->place['pass'] = 'onbekend'; } print ''."\n";