Hello. So i've lookeid around at the invalidate stuff for the past 2
days now and have come up with the following workaround:

        if (!empty($this->data))
        {
                $user = $this->User->findByUsername($this->data['User']
['username']);
                if(!empty($user['User']['username']))
                {
                        $this->User->invalidate('username_unique');
                }

                if($this->data['User']['password'] != $this-
>data['User']['password_confirm'])
                {
                        $this->User->invalidate('password_confirm');
                }

                $email = $this->User->findByEmail($this->data['User']
['email']);

                if(!empty($email['User']['email']))
                {
                        $this->User->invalidate('email_unique');
                }

                if (empty($this->User->validationErrors)) { //i added
this to make sure the validate array is empty, becuase when its full
and then $this->user->save is called it seems to overwrite my error
arrays? not sure whats going on
                        if ($this->User->save($this->data))
                        {
                                                $this->flash('Your register has 
been a success.','/');
                                        }
                }

        }


Hope this is useful to someone.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"CakePHP" 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?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to