|
|
On Fri, Sep 10, 2010 at 3:06 PM, Lance <lance3325@xxxxxxxxx> wrote:
> I actually want to check isUnique if they edit their username or email
> address.
> I want it to check their changed username or email against the
> database to make sure it already doesn't exist.
> Sorry for the confusion. Thanks again!
My fault, I didn't read that carefully.
In this case, you could create a validation method that fetches both
the ID and the value of whichever column you're checking. If it exists
AND the ID is not the current model ID then return false.
During validation, you can check $this->id for the current model's ID.
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@xxxxxxxxxxxxxxxx
To unsubscribe from this group, send email to
cake-php+unsubscribe@xxxxxxxxxxxxxxxx For more options, visit this group at
http://groups.google.com/group/cake-php?hl=en
|
|