Hi Sam,
If you follow Attila's second solution changing your code to be:
/ Try to save as normal, shouldn't work if the field was
invalidated.
if ($this->User->validates($this->data)) {
$this->User->save($this->data, false)
// don't need to try and validate twice, will still work fine with the
second parameter ommited
$this->flash('You have been
successfully registered.',
'/users/login');
} else {
$this->render();
}
You should have the result you are looking for. If you have custom
validations of any kind I think this is the best approach.
Cheers,
AD7six
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Cake
PHP" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/cake-php
-~----------~----~----~----~------~----~------~--~---