From 2c890730b671f4bbb3fb73dc9f30ba88f1946b59 Mon Sep 17 00:00:00 2001 From: printempw Date: Sun, 11 Sep 2016 15:39:55 +0800 Subject: [PATCH] fix email binding --- app/Http/Middleware/CheckAuthenticated.php | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/app/Http/Middleware/CheckAuthenticated.php b/app/Http/Middleware/CheckAuthenticated.php index 1986f0fd..e27cd81a 100644 --- a/app/Http/Middleware/CheckAuthenticated.php +++ b/app/Http/Middleware/CheckAuthenticated.php @@ -39,15 +39,17 @@ class CheckAuthenticated Session::put('token', $user->getToken(true)); setcookie('token', session('token'), time() + 3600, '/'); - return $user; + return $next($request); } else { - return View::make('auth.bind')->with('msg', '该邮箱已被占用'); + echo View::make('auth.bind')->with('msg', '该邮箱已被占用'); } } else { - return View::make('auth.bind')->with('msg', '邮箱格式错误'); + echo View::make('auth.bind')->with('msg', '邮箱格式错误'); } + exit; } - return view('auth.bind'); + View::show('auth.bind'); + exit; } if ($return_user)