am a new fuelphp user, and am working on a project that have 3500+ user with thier passwords encrypted with md5, and I want to rewrite this project with fuelphp.
can you show me how to use md5 instead of the actual auth method to preserve passwords!!!.
Just replace the hash_password method to use md5. From what I recall about the package it just validates passwords by running hash_password on the input and comparing it to what's in the database. Additionally, the passwords for new users are hashed with hash_password as well.
To be more exact: extend the Auth class in your application, and overload the hash_password method. It's not advisable to change code in the package, that would hamper future upgrades.
Read the docs section on extending core classes. The classes in the Auth package are added to the core, so they can be extended in the same way.
In short (assuming you want to extend the login driver): - make sure the Auth package is always_load'ed - create app/classes/auth/login/simpleauth.php - define it as class Auth_Login_Simpleauth extends \Auth\Auth_Login_Simpleauth - add to the app bootstrap:
The name of the class has been changed in 1.6, Auth_Login_SimpleAuth is invalid according to the coding standards (class name segments should be ucfirst()).