From 6615cc366c7d58b2f3291a76d6c299a114155899 Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Tue, 18 Jan 2011 16:47:52 +0300 Subject: properly handle redirecting back to requested page after logging in (closes #302) --- functions.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'functions.php') diff --git a/functions.php b/functions.php index 64269aada..0bbefd581 100644 --- a/functions.php +++ b/functions.php @@ -1985,7 +1985,12 @@ } } - header("Location: " . $_SERVER["REQUEST_URI"]); + if ($_REQUEST['return']) { + header("Location: " . $_REQUEST['return']); + } else { + header("Location: " . $_SERVER["REQUEST_URI"]); + } + exit; return; -- cgit v1.2.3-54-g00ecf