summaryrefslogtreecommitdiffstats
path: root/public_html
diff options
context:
space:
mode:
Diffstat (limited to 'public_html')
-rw-r--r--public_html/index.php7
1 files changed, 6 insertions, 1 deletions
diff --git a/public_html/index.php b/public_html/index.php
index f0c099478..de9d2a16c 100644
--- a/public_html/index.php
+++ b/public_html/index.php
@@ -221,7 +221,12 @@ try {
if (is_cli_client()) {
show_error(nl2br(htmlspecialchars($e->__toString())), $e->get_http_error_code());
} else {
- redirect("user/login");
+ $CI =& get_instance();
+ $redirect_uri = $CI->uri->uri_string();
+ if (isset($CI->data["redirect_uri"])) {
+ $redirect_uri = $CI->data["redirect_uri"];
+ }
+ redirect("user/login?redirect_uri=".$redirect_uri);
}
} catch (\exceptions\PublicApiException $e) {
show_error(nl2br(htmlspecialchars($e->__toString())), $e->get_http_error_code());