From 714b36763f3d769c318ee2c43f8a7e7498fcd70b Mon Sep 17 00:00:00 2001 From: Camil Staps Date: Thu, 7 May 2015 15:32:43 +0300 Subject: LoginException; RedirectException --- src/controllers/UserController.php | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'src/controllers/UserController.php') 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(); } -- cgit v1.2.3