Fixed redirects with “cachet_redirect” helper

This commit is contained in:
Davide Bellini
2016-10-13 09:51:44 +02:00
parent aff834cac0
commit 05f93e16e8
13 changed files with 83 additions and 62 deletions

View File

@@ -58,7 +58,7 @@ class AuthController extends Controller
if (Auth::user()->hasTwoFactor) {
Session::put('2fa_id', Auth::user()->id);
return cachet_route('auth.two-factor');
return cachet_redirect('auth.two-factor');
}
Auth::attempt($loginData, $rememberUser);
@@ -68,7 +68,7 @@ class AuthController extends Controller
return Redirect::intended(cachet_route('dashboard'));
}
return cachet_route('auth.login')
return cachet_redirect('auth.login')
->withInput(Binput::except('password'))
->withError(trans('forms.login.invalid'));
}
@@ -113,11 +113,11 @@ class AuthController extends Controller
// Failed login, log back out.
Auth::logout();
return cachet_route('auth.login')->withError(trans('forms.login.invalid-token'));
return cachet_redirect('auth.login')->withError(trans('forms.login.invalid-token'));
}
}
return cachet_route('auth.login')->withError(trans('forms.login.invalid-token'));
return cachet_redirect('auth.login')->withError(trans('forms.login.invalid-token'));
}
/**