Advertisement
Guest User

Untitled

a guest
May 19th, 2014
103
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.47 KB | None | 0 0
  1. public function doLogin(){
  2.  
  3.         // create our user data for the authentication
  4.         $userdata = array(
  5.             'Nombre_Usuario'    => Input::get('username'),
  6.             'Contrasena'    => Input::get('password')
  7.         );
  8.  
  9.         // attempt to do the login
  10.         if (Auth::attempt($userdata, true)) {
  11.             return Redirect::to('/home')->with('message', 'You are logged in.');
  12.         }else{
  13.             return Redirect::to('/')->with('message', 'Your username/password combination was incorrect.')->withInput();
  14.         }
  15.  
  16.     }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement