From 1eddc70d8c2b4a5e5fc677385458a4b9fea8e61a Mon Sep 17 00:00:00 2001 From: Michael Joseph Date: Tue, 3 Jun 2003 11:49:09 +0000 Subject: [PATCH] persist redirect on login failure --- presentation/login.php | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/presentation/login.php b/presentation/login.php index ed227a1..14308d8 100644 --- a/presentation/login.php +++ b/presentation/login.php @@ -74,10 +74,11 @@ if ($loginAction == "loginForm") { "; -} -elseif ($loginAction == "login") { +} elseif ($loginAction == "login") { // set default url for login failure - $url = $url . "login.php?loginAction=loginForm"; + // with redirect appended if set + $url = $url . "login.php?loginAction=loginForm" . (isset($redirect) ? "&redirect=$redirect" : ""); + // if requirements are met and we have a username and password to authenticate if( isset($fUserName) && isset($fPassword) ) { // verifies the login and password of the user @@ -143,13 +144,11 @@ elseif ($loginAction == "login") { // didn't receive any login parameters, so redirect login form // TODO: set "no login parameters received error message? // internal error message- should never happen + $default->log->error(" } if (strlen($queryString) > 0) { $url .= "&$queryString"; } - $default->log->debug("login.php: about to redirect to $url"); redirect($url); } -?> - - +?> \ No newline at end of file -- libgit2 0.21.4