Answer the question
In order to leave comments, you need to log in
How to login a user if the password field has a custom name and custom encryption?
The `name` and `passwd` fields are used for registration.
passwd is generated like this:
How do I login a user?
Changed in user modelmd5($request['name'] . $request['passwd], true);
public function getAuthPassword()
{
return $this->passwd;
}
public function username()
{
return 'name';
}
Answer the question
In order to leave comments, you need to log in
Well, use manual authentication. Example from the docs. In your case, not email, but name will be
Well, then you yourself from the request, throw the data here ...
public function authenticate()
{
if (Auth::attempt(['email' => $email, 'password' => $password])) {
// Аутентификация успешна...
return redirect()->intended('dashboard');
}
}
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question