-
-
Save angelmartz/7600106 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// if you need the strtolower or some other data tweaks. | |
// remember me | |
$remember = Input::get('remember'); | |
$credentials = array( | |
'username' => strtolower(Input::get('email')), | |
'password' => Input::get('password'), | |
'remember' => !empty($remember) ? $remember : null | |
); | |
if (Auth::attempt($credentials)) | |
{ | |
return Redirect::to('/'); | |
} | |
// OR | |
// now using this. | |
if (Auth::attempt(Input::all())) | |
{ | |
return Redirect::to('port'); | |
} | |
else | |
{ | |
Session::flash('login_problem', 'login problem'); | |
return Redirect::to('login'); | |
} | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment