I try to run this code but oddly enough only the 'username_unique'
tagError will trigger.
None of the other ones trigger.
But if I remove the clause that says:
            if ($this->User->save($this->data))
                        {
                        $this->flash('Your register has been a success.','/');
                        }

Then all of the tagErrors work.

Anyone have any idea? Is this some bug?

thanks
rocket

    function register()
    {
        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 ($this->User->save($this->data))
                        {
                        $this->flash('Your register has been a success.','/');
                        }
        }
    }
--~--~---------~--~----~------------~-------~--~----~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to