Since Auth::attempt only returns true or false, your would need to directly query the auth-table to see if the user exists.
I'm assuming the auth-table is 'users'. Something like this maybe.
$user = Users::where('email', Input::get('email'));
if (is_null($user)) {
/* user does not exist */
return Redirect::route('account-sign-in')
->with('global','No account registered with provided EMail address.');
}
.. proceed with auth:check for password....
Or there is some code using the validator obj, that might work, http://stackoverflow.com/questions/17799148/how-to-check-if-a-user-email-already-exist
Hope that helps,
Maybe try replacing this
'password' => Input::get('password');
'password' => Hash::make(Input::get('password'));
Only thing I can think of off hand.
i solve it like @TerrePorter said
$find_user = User::Where('email', '=' , 'Input::get('email')')->first(); if($find_user) { // Here i do Auth and if it false so the error from password } else { //Here the error from wrong email }
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community