Can someone point out what I am doing wrong here? Trying to create and save
User + Profile at the same time.
Fieldlist has some User and Profile fields
I have in the controller
if ( $this->User->validates() && $this->Captcha->validates(
$this->data['User']['human'] ) ) {
$fieldList = array('id', 'role_id', 'firstname', 'lastname', 'security',
'confirm_code', 'ip', 'email', 'slug', 'id', 'type');
if( $this->User->saveAll( $this->data, array( 'validate' => 'first',
'atomic' => true, $fieldList ) ) ) {
//other stuff
}
}
It saves the data yet when I manually edit the form with Firebug adding
other fields it saves it to the database even when its excluded from the
safe fieldlist. Maybe it has to do with $data vs $this->data? not sure.
Does the model hold validation true after the if $this->User->validates() ?
So then it skips the 'validate' => 'first', in the second call to
validation?
Thanks,
Dave
Check out the new CakePHP Questions site http://cakeqs.org and help others with
their CakePHP related questions.
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