Hi,
If this for a change of password or user registration, you will have a
confirm password field, this wont be sha1 by the auth conponent, so do
all the validation on this,
then encrypt it and compare to the password.
On 24 Sep, 00:05, rocket [EMAIL PROTECTED] wrote:
So I have validation code
So I have validation code for my user password ($password) in my model
to be 6-20 characters, but I am doing sha1($password) on my password
before it gets passed into the $this-User-save() operation, so it
always bypasses the validation requirement (since sha1 creates a
really big string).
How
I'm guessing you're not using the Auth component (
http://book.cakephp.org/view/172/Authentication ) due to a legacy DB.
In that case:
http://book.cakephp.org/view/76/Callback-Methods#beforeSave-683
Also take a look at the core Security class:
http://api.cakephp.org/class_security.html
for
Oh, and I forgot to mention that you can actually integrate the Auth
component into a pre-existing users table which used a custom hashing/
salting scheme: http://book.cakephp.org/view/566/Changing-Encryption-Type
-J.
On Sep 23, 7:42 pm, Joel Perras [EMAIL PROTECTED] wrote:
I'm guessing you're
Are these valid for 1.2?
Is auth in 1.1?
Ill look into it further but just posting this incase someone can
answer me qucikly.
thanks
On Sep 23, 7:53 pm, Joel Perras [EMAIL PROTECTED] wrote:
Oh, and I forgot to mention that you can actually integrate the Auth
component into a pre-existing
All the things I mentioned were for Cake 1.2. Auth is not present in
Cake 1.1.
Forgive me for not being clear.
-J.
On Sep 23, 11:04 pm, rocket [EMAIL PROTECTED] wrote:
Are these valid for 1.2?
Is auth in 1.1?
Ill look into it further but just posting this incase someone can
answer me
Gotcha.
I ended up using beforeSave()
thanks
On Sep 24, 12:05 am, Joel Perras [EMAIL PROTECTED] wrote:
All the things I mentioned were for Cake 1.2. Auth is not present in
Cake 1.1.
Forgive me for not being clear.
-J.
On Sep 23, 11:04 pm, rocket [EMAIL PROTECTED] wrote:
Are these