summaryrefslogtreecommitdiffstats
path: root/application
diff options
context:
space:
mode:
Diffstat (limited to 'application')
-rw-r--r--application/controllers/user.php2
-rw-r--r--application/core/MY_Controller.php1
-rw-r--r--application/views/header.php2
3 files changed, 4 insertions, 1 deletions
diff --git a/application/controllers/user.php b/application/controllers/user.php
index 009e4c90c..e68a544f1 100644
--- a/application/controllers/user.php
+++ b/application/controllers/user.php
@@ -192,6 +192,8 @@ class User extends MY_Controller {
$referrer = $query["user"];
+ $this->data['redirect_uri'] = "/";
+
if ($process !== false) {
$username = $this->input->post("username");
$email = $this->input->post("email");
diff --git a/application/core/MY_Controller.php b/application/core/MY_Controller.php
index 5181c2904..79d258c37 100644
--- a/application/core/MY_Controller.php
+++ b/application/core/MY_Controller.php
@@ -103,5 +103,6 @@ class MY_Controller extends CI_Controller {
$this->load->model("muser");
$this->data["user_logged_in"] = $this->muser->logged_in();
+ $this->data['redirect_uri'] = $this->uri->uri_string();
}
}
diff --git a/application/views/header.php b/application/views/header.php
index 6332382b2..0e1f174de 100644
--- a/application/views/header.php
+++ b/application/views/header.php
@@ -77,7 +77,7 @@ if (is_cli_client() && !isset($force_full_html)) {
<?php if(auth_driver_function_implemented("can_reset_password")) { ?>
<p><?php echo anchor("user/reset_password", "Forgot your password?"); ?></p>
<?php } ?>
- <?php echo form_open("user/login?redirect_uri=".get_instance()->uri->uri_string(), array("class" => "form-signin")); ?>
+ <?php echo form_open("user/login?redirect_uri=".$redirect_uri, array("class" => "form-signin")); ?>
<input type="text" name="username" placeholder="Username" class="form-control">
<input type="password" name="password" placeholder="Password" class="form-control">
<button type="submit" name="process" class="btn btn-default btn-block">Login</button>