summaryrefslogtreecommitdiffstats
path: root/config
diff options
context:
space:
mode:
authorMichael Francis <edude03@gmail.com>2011-07-01 00:59:21 -0400
committerMichael Francis <edude03@gmail.com>2011-07-01 00:59:21 -0400
commitdc189ba46fc8c2f54b6f680410b9e7f85e6c9c8d (patch)
tree70e43a8481dda1e0b4731fdeacbb68cc26c90efd /config
parente8f63ebfaeb9fd9463e89b676d8f4043d2d7e0d9 (diff)
downloadotakuhub-dc189ba46fc8c2f54b6f680410b9e7f85e6c9c8d.tar.xz
Fix to redirect a user if they request a private function while not logged in
Diffstat (limited to 'config')
-rw-r--r--config/bootstrap/auth.php5
1 files changed, 4 insertions, 1 deletions
diff --git a/config/bootstrap/auth.php b/config/bootstrap/auth.php
index acbc4d5..a82d63a 100644
--- a/config/bootstrap/auth.php
+++ b/config/bootstrap/auth.php
@@ -123,7 +123,10 @@ Dispatcher::applyFilter('_callable', function($self, $params, $chain) {
return $ctrl;
}
- //Otherwise, send them to the login page
+ //Save the location they are going to
+ $value = array('controller' => $ctrl->request->controller, 'action' => $ctrl->request->action, 'args' => $ctrl->request->args);
+ Session::write('url', $value);
+ //Redirect them to the login page
return function() use ($request) {
return new Response(compact('request') + array('location' => '/login'));
};