I have to do a migration of users from an old database where the passwords are stored in MD5, while in the new application using SHA512.
My purpose is that the old users on first login in the new application must change the password but this implies you can load these users from the database with the password in MD5.
How this can be done using Symfony 2.3.3 + FOSUserBundle?
sha512for password encoding. You may want to read How to use Bcrypt to encode password or its compatibility library - Toukimd5passwords present in your database. On user input,password_verify($raw), if it doesn't match, try with apassword_verify(md5($raw)). If it does, update the matching line withpassword_hash($raw)- Touki