Created
May 4, 2012 08:16
-
-
Save Nickstr/2593216 to your computer and use it in GitHub Desktop.
AUTH + CHECK + LOGOUT
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
// Login controller | |
public function get_inloggen() | |
{ | |
Return View::make('back/login'); | |
} | |
public function post_inloggen() | |
{ | |
if (Auth::attempt(Input::get('email'), Input::get('password'))) | |
{ | |
return Redirect::to(Session::get('previous')); | |
} else { | |
return Redirect::to('gebruiker/inloggen'); | |
} | |
} | |
public function get_uitloggen() | |
{ | |
Auth::logout(); | |
return Redirect::to('/'); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment