1

In my user table , coumns name for email is user_email and password is user_pass

I would like to override postLogin() method inside AuthController to be able to authenticate the users

Here is what i tried

 public function postLogin(\Illuminate\Http\Request $request)
{
        $this->validate($request, ['user_email' => 'required|email', 'user_pass' => 'required']);

        $credentials = $request->only('user_email', 'user_pass');


     if ($this->auth->attempt($credentials, $request->has('remember')))
        {
            return redirect()->intended($this->redirectPath());
        }
}

This throws ErrorException in EloquentUserProvider.php line 111: Undefined index: password

But I'm not passing password index at all !! from my login form the name of input is user_email and user_pass

Any Clue

echoashu
  • 912
  • 3
  • 14
  • 31
  • Password is hardcoded, see this for a solution: http://stackoverflow.com/questions/26073309/how-to-change-custom-password-field-name-for-laravel-4-and-laravel-5-user-auth – Björn Jun 16 '15 at 11:48
  • seems to work, still testing and will post the solution when I'm satisfied ;-) – echoashu Jun 16 '15 at 12:11

0 Answers0