To preface, I've seen this a few places before but the solutions given
aren't getting me anywhere.

I've got a basic User model extending AppModel, I'm finding a record
based on the matching the data in 2 fields, changing 1 field in the
returned array and trying to save (update) that record by sending the
array back to the save method...

// start code:

$data = $this->User->find( array('User.username' => $username,
'User.email' => $email) );

$data['User']['passwd'] = $this->Auth->password('test');

//
// problem occurs with or without following line:
// $this->User->user_id = $data['User']['user_id'];
//

$this->User->save( $data );

// end of code.

This results in an attempt to insert a new record with the user_id in
$data.

Any help is appreciated, I've migrated into Cake this week and am
trying to convert an existing procedural app to it.

-andy

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