Support the ongoing development of Laravel.io →
posted 10 years ago
Authentication
Last updated 2 years ago.
0

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,

Last updated 10 years ago.
0

Maybe try replacing this

'password' => Input::get('password');
  • with this -
'password' => Hash::make(Input::get('password'));

Only thing I can think of off hand.

Last updated 10 years ago.
0

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 }

0

Sign in to participate in this thread!

Eventy

Your banner here too?

Moderators

We'd like to thank these amazing companies for supporting us

Your logo here?

Laravel.io

The Laravel portal for problem solving, knowledge sharing and community building.

© 2025 Laravel.io - All rights reserved.