Dumb Newbie Need Password Hashing Help
Posted 10 May 2010 - 05:41 PM
I've put in srbac.
I've got a user table with user id, user name, password and salt fields.
I've put in the public functions validatePassword($password), hashPassword($password,$salt), & generateSalt()
I know I need to generateSalt, then hash the user entered password before I save it.
Where should I do this? In beforeSave? Should I put beforeSave in the model or the controller? What does the code look like? Is there any place where I can see a functional snippet of this code? Am I missing something simple (as usual)?
Posted 11 May 2010 - 03:25 PM
Thanks so much for the reply, but I saw that, and working from that is what caused my trouble.
From that link: "Note that this blog system does not provide the user management feature. As a result, a user cannot change his account or create a new one through the Web interface. The user management feature may be considered as a future enhancement to the blog application."
The blog tutorial leaves making a user management module up to the programmer and that is the part I cannot figure out.
Posted 11 May 2010 - 03:54 PM