Never mind I found my answer!  For those of you looking to get two
password fields to validate, or having the same problem as me this
form has your answers.  Here's what was wrong:

In the Controller this is what I had:

       //register function
        function register() {
                if (!empty($this->data)) {
                        if ($this->data['User']['password'] == $this-
>Auth->password($this-
>data['User']['password_confirm'])) {

                                $this->User->create();
                                $this->User->save($this->data);
                                $this->Session->setFlash("You have
been registered!  You can log
in now.");
                                $this->redirect(array('action' =>
'index'));
                        }
                }
        }

I checked out my original code and compared it, after comparing it I
added this little snippet and now it works:

        //register function
        function register() {
                if (!empty($this->data)) {
                        if ($this->data['User']['password'] == 
$this->Auth->password($this-
>data['User']['password_confirm'])) {
                                $this->User->create() && 
$this->User->validates();
                                if ($this->User->save($this->data)) {
                                        $this->Session->setFlash("You have been 
registered!  You can log
in now.");
                                        $this->redirect(array('action' => 
'index'));
                                }
                        }
                }
        }


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