aboutsummaryrefslogtreecommitdiff
path: root/src/controllers/UserController.php
diff options
context:
space:
mode:
Diffstat (limited to 'src/controllers/UserController.php')
-rw-r--r--src/controllers/UserController.php7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/controllers/UserController.php b/src/controllers/UserController.php
index 9f914c6..b5349d6 100644
--- a/src/controllers/UserController.php
+++ b/src/controllers/UserController.php
@@ -26,6 +26,13 @@ class UserController extends BaseController {
public function login() {
Auth::basic();
+
+ if (!Auth::check()) {
+ throw new Exception\LoginException;
+ } elseif (!empty(Input::get('redirect'))) {
+ throw new Exception\RedirectException(Input::get('redirect'));
+ }
+
return Auth::user();
}