TL; DR; You can call your password field in any way convenient for you if your user model uses the interface correctly.
However, you cannot pass another array key to the Auth::attempt method - only password can be there
First of all, you are doing it wrong - you need to pass an array of credentials as the first parameter:
if (Auth::attempt(Input::only('user_displayName', 'user_password')))
Further, unfortunately, the Eloquent provider has a hard-coded index of the password array in the code, so you cannot pass user_password to the attempt method.
So here is what you need:
$credentials = Input::only('user_displayName'); $credentials['password'] = Input::get('user_password'); if (Auth::attempt($credentials))
source share