Now I'm just starting to use cakePHP, so take this with caution:

---------------------------
Solution 1)

You have to put ALL your invalidate statements (and thus of course the
checks you make) into a function "beforevalidate" (check the correct
syntax). This is running - as the name says - before validate() runs -
and it is in validate where the invalidation you set is considered and
applied.

Having your invalidate in your standard action (in register())is too
late, validate did run already.

Solution 2)

If you invalidate in your regular action (register()), you can do this:

a) invalidate your field
   $this->User->invalidate('confirmemail');
b) call validate() to check validation
   if($this->User->validates( $this->data ))

 then follow with your if and your else code accordingly
---------------------------

I'm using solution 2 with good success, works fine. (Any hints if this
can be done better are always welcome)

Again, I'm just beginning, so check this before taking action on it, I
might be wrong here.

HTH, 
Attila


--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to