Osea que lo mas sencillo es hacerlo asi:
Código PHP:
Ver originalpublic function postLogin()
{
try
{
'password' => 'password',
);
$user = Sentry::authenticate($credentials, false);
}
catch (Cartalyst\Sentry\Users\LoginRequiredException $e)
{
$error = 'Login field is required.';
}
catch (Cartalyst\Sentry\Users\PasswordRequiredException $e)
{
$error = 'Password field is required.';
}
catch (Cartalyst\Sentry\Users\WrongPasswordException $e)
{
$error = 'Wrong password, try again.';
}
catch (Cartalyst\Sentry\Users\UserNotFoundException $e)
{
$error = 'User was not found.';
}
catch (Cartalyst\Sentry\Users\UserNotActivatedException $e)
{
$error = 'User is not activated.';
}
catch (Cartalyst\Sentry\Throttling\UserSuspendedException $e)
{
$error = 'User is suspended.';
}
catch (Cartalyst\Sentry\Throttling\UserBannedException $e)
{
$erro = 'User is banned.';
}
return Redirect::to('/')->with('error_message', $error);
}