I want to re-develop my existing project to laravel.
In my old system I store password into md5.
Now how can I convert it according to laravel hash method for existing user.
Is there any direct method to do it?
I want to re-develop my existing project to laravel.
In my old system I store password into md5.
Now how can I convert it according to laravel hash method for existing user.
Is there any direct method to do it?
No there's no direct method, but you could achieve that by overriding
postLogin
insideAuth/AuthController.php
so it will check if the password is inmd5
format then recrypt it with laravel hashing method else the user will connect normally, like :Hope this helps.
Unfortunately no.
The only method to achieve it is to develop new behavior of your app (writen in laravel) that allows users to login using old, md5-hashed passwords, and then enforces password change or - because you can get users password during login process - store password using laravels hashing method by updating logged user model.
Only the user should change his password (as you can't see their password). So you should send a reset password link for them and then update the password with Laravel hash method.