isUnique validation on edit action of User model
I have a User model and I want to allow logged in users to edit their
username or email address if they would like. I just want the
username or email address that they've changed to check against the
database to make sure it's unique. I'm using a beforeValidate method
on the sign up process to check uniqueness and that works great but
when they're are logged in and go to edit their account they're are
able to change those fields without it checking isUnique in database.
If I add isUnique in $validate array it always isUnique and will throw
an error. Any help would be greatly appreciated!
Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions.
You received this message because you are subscribed to the Google Groups "CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to
cake-php+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en

0 Comments:
Post a Comment
Subscribe to Post Comments [Atom]
<< Home