Where does the code fail?

Here is a snippet of mine that does function.

if ( !$this->User->passwordComplex($this->data['User']['password']) ){
        $this->User->invalidate('password');
}elseif( $this->data['User']['password'] != $this->data['Temp']['verify'] ){
        $this->User->invalidate('password');
        $this->set('password_error', $this->ggMessages['pass2']);
}
....
if ( $this->User->save($this->data['User']) ){
...

My model is User vs yours is Client. Guessing perhaps you wish to
invalidate password and not confirm_password? Which is part of your
model?



On 5/31/07, cake_learner <[EMAIL PROTECTED]> wrote:
>
> I want confirm password to be validated. (Both password and confirm
> password should be same)
>
> views:
>
>                 Password
>                 <?php echo $html->tagErrorMsg('Client/password', 'Password is
> required.') ?>
>                 <?php echo $html->input('Client/password', array('size' => 
> '10'))?>
> <p>
>
>                 Confirm Password
>                 <?php echo $html->tagErrorMsg('Client/confirm_password', 
> 'Confirm
> Password is required.') ?>
>                 <?php echo $html->input('Client/confirm_password', 
> array('size' =>
> '10'))?> <p>
>
>
> controller:
>
>            function index() {
>
>            if (!empty($this->data))
>         {
>
>                     
> if(($this->data['Client']['password'])!=($this->data['Client']
> ['confirm_password']))
>                         $this->Client->invalidate('confirm_password');
>
>
>             if ($this->Client->save($this->data))
>             {
>                 $this->flash('Your post has been saved.','/clients/
> register2');
>                         }
>                         else
>                         {
>                              $this->render();
>                         }
>         }
>
>            }
>
> The above code is not working.
>
>
> >
>

--~--~---------~--~----~------------~-------~--~----~
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?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to