diff options
author | Michael Francis <edude03@gmail.com> | 2011-07-01 00:59:21 -0400 |
---|---|---|
committer | Michael Francis <edude03@gmail.com> | 2011-07-01 00:59:21 -0400 |
commit | dc189ba46fc8c2f54b6f680410b9e7f85e6c9c8d (patch) | |
tree | 70e43a8481dda1e0b4731fdeacbb68cc26c90efd /controllers | |
parent | e8f63ebfaeb9fd9463e89b676d8f4043d2d7e0d9 (diff) | |
download | otakuhub-dc189ba46fc8c2f54b6f680410b9e7f85e6c9c8d.tar.xz |
Fix to redirect a user if they request a private function while not logged in
Diffstat (limited to 'controllers')
-rw-r--r-- | controllers/UsersController.php | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/controllers/UsersController.php b/controllers/UsersController.php index cc0b3db..fdea5f8 100644 --- a/controllers/UsersController.php +++ b/controllers/UsersController.php @@ -319,9 +319,14 @@ class UsersController extends \lithium\action\Controller { } //If the user was trying to go somewhere, redirect them there - if ($location != null) + $loc = Session::read('url'); + if (isset($loc)) { - + Session::delete('url'); + return $this->redirect(array('controller' => $loc['controller'], + 'action' => $loc['action'], + 'args' => $loc['args'] + )); } //Otherwise send them to the hompa return $this->redirect('Users::feed'); |