Support the ongoing development of Laravel.io →
Authentication

I am facing this issue while using default Authentication feature, I need to change user_login and user_pass fields that are in db ( i can't change them because my WordPress blog is already working on it and I am developing this app to support it), My AuthController is contains code like as under;

protected $username = 'user_login';
public function __construct()
{
$this->middleware('guest', ['except' => 'getLogout']);
}
protected function validator(array $data)
{
return Validator::make($data, [
'user_login' => 'required|max:255',
'user_pass' => 'required|confirmed|min:6',
]);

same user_login and user_pass are coming from my Login View and on post in using Auth\Login.

Further, I have changed some of the code as under in AuthenticatesUsers, under public function postLogin(Request $request)

$this->validate($request, [
    $this->loginUsername() => 'required', 'user_pass' => 'required',
]);

and I also have change something under this section ;

protected function getCredentials(Request $request)
{
return $request->only($this->loginUsername(), 'user_pass');
}

Now, I believe my password in DB is MD5 , its 32 chars long, I am getting this error message when I tried to login <b>"These credentials do not match our records."</b>

I have also tried this in my User Model,

public function setPasswordAttribute($password) {
return $this->attributes['user_pass'] = bcrypt($password);
//return $this->attributes['user_pass'] = md5($password); 
}

Please guide or help, thanks in advance

Last updated 2 years ago.
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.