diff options
author | Camil Staps | 2015-05-07 15:32:43 +0300 |
---|---|---|
committer | Camil Staps | 2015-05-07 15:32:43 +0300 |
commit | 714b36763f3d769c318ee2c43f8a7e7498fcd70b (patch) | |
tree | 69d475a146e31f9db789bae985ed3a05897f6374 /src/controllers/UserController.php | |
parent | Fixed last commit (diff) |
LoginException; RedirectException
Diffstat (limited to 'src/controllers/UserController.php')
-rw-r--r-- | src/controllers/UserController.php | 7 |
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(); } |