Wondering why when I specify fields in this contain for User I cant
get and of the related Profile fields?
If i remove 'fields' from the User it pulls all User fields and then I
get my Profile fields but I dont want all my User fields, just the few
i need. What am I doing wrong here?
public function getUser($auth_id)
//this fetches basic info for the profile view/index
{
$params = array(
'conditions' => array(
'User.id' => $auth_id),
'fields' => array(
'User.firstname',
'User.lastname',
'User.username',
'User.email',
'User.slug',
'User.id',
'User.reset',
'User.confirm_code'),
'contain' => array(
'Profile' => array(
'fields' => array(
'Profile.id',
'Profile.email'))));
$q = $this->find('first', $params);
return $q;
}
--
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=.