From ad16e8ff484b1942ff905b6b87fe174740917afb Mon Sep 17 00:00:00 2001 From: Florian Pritz Date: Sun, 5 Jun 2016 19:13:54 +0200 Subject: Fix redirect on login after registering new account Previously the login box in the navigation would redirect to the current page, but this page will throw an error in the case of the registration page since that's the page with the invition key and that key is no longer valid. Fix this by redirecting to the $redirect_uri and ensure that this value is set for all requests. Signed-off-by: Florian Pritz --- application/controllers/user.php | 2 ++ 1 file changed, 2 insertions(+) (limited to 'application/controllers') 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"); -- cgit v1.2.3-24-g4f1b