I would force them to change the password.
Inform them by mail tht the need to do a password reset and link to the reset password page where they fill in their email and send them the reset link.
Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.
I'm inheriting from a users table where passwords are encrypted like this Hash::make(md5('password')) and I need to merge it to other tables where it's encrypted like the standard way Hash::make('password').
To avoid forcing the user to reset his password, I'd like to check during the login process if the password has an additional md5() hash and, in this case, automatically replace it by standard Hash::make('password') before logging in.
How should I do it ?
what about
protected function attemptLogin(\Illuminate\Http\Request $request)
{
$isPassed = $this->guard()->attempt($this->credentials($request), $request->filled('remember'));
if (! $isPassed) {
$isPassed = $this->guard()->attempt(array_merge($this->credentials($request), ["password" => md5($request->input("password"))]), $request->filled('remember'));
if ($isPassed) {
$user = Auth::user();
$user->password = Hash::make($request->password);
$user->save();
return true;
}
}
return $isPassed;
}
Please or to participate in this conversation.