summaryrefslogtreecommitdiff
path: root/functions.php
diff options
context:
space:
mode:
authorAndrew Dolgov <[email protected]>2011-01-18 16:47:52 +0300
committerAndrew Dolgov <[email protected]>2011-01-18 16:47:52 +0300
commit6615cc366c7d58b2f3291a76d6c299a114155899 (patch)
treed6bce1bdb53292f03ede97bb9dfe36d365707108 /functions.php
parent8122dae505d4115773f348b973a7ea2ec360e2b6 (diff)
properly handle redirecting back to requested page after logging in (closes #302)
Diffstat (limited to 'functions.php')
-rw-r--r--functions.php7
1 files changed, 6 insertions, 1 deletions
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;