-
Notifications
You must be signed in to change notification settings - Fork 26
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add user with password as MD5 hash #14
Comments
Hi, Test it and let me know :) |
Hi! and thanks you very much for your quick answer! I was trying some sort of "hardcoding" assuming that always I will use MD5, at this way: $crud->callback_before_insert(md5('password')); but not worked. Your suggestion is not working neither for me, may be because I do not have the users() function inside the Login controller, should be there? Note: I also tried to move the users() function inside the Login.php controller and also the passwords are stored as clear text. Also I do not understand the function encrypt_password_callback() and where it should be pasted. I'm sorry, I'm still newbie with CI, GC et all and need to learn :) |
$crud->callback_before_insert(md5('password')); You have to follow this documentation strictly: https://www.grocerycrud.com/documentation/options_functions/callback_before_insert |
Thanks for your answer. I think that in https://github.com/portapipe/Login-GroceryCrud/wiki/Manage-the-users were says: If you need to use MD5 encryption, add this just above the $output row:
shoud says: If you need to use MD5 encryption, add this just above the $output row:
At this way it seems to work. |
With the example for the user's CRUD, GC always store the password in clear text, even when have the MD5 configured.
How to store the hash instead the clear text password?
The text was updated successfully, but these errors were encountered: