I want to send an email with the email component.  No problem there.

However, I don't want it to be a hidden field in the form so I thought
I could do something in the controller.

So I did this line:

$email = $this->User->find('first', array('conditions' =>
array('User.id' => $this->data['Friend']['friend_id']), 'fields' =>
'User.email_address'));

Which to my surprise (still learning all of these functions) it did
get the email address but the find function turns the info into an
array and then the email component has an array to deal with rather
than the specific string (email_address).

I thought I could use the field() method but I am confused as to how
to get it to work and there isn't much documentation.

I tried:

$email = User->field('email_address', array('id' => $this-
>data['Friend']['friend_id']));

and got:

Parse error: syntax error, unexpected T_OBJECT_OPERATOR in /var/www/
vhosts/theactorstoolkit.com/httpdocs/app/controllers/
users_controller.php  on line 69

which shows up on the screen before I even get to the page.

I tried:

$email = $model->field('email_address', array('id' => $this-
>data['Friend']['friend_id']));

and once I submit the form it gives me:

Notice (8): Undefined variable: model [APP/controllers/
users_controller.php, line 69]

Anyone know how this should be done.

Thank you!

Brad

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 cake-php@googlegroups.com
To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en

Reply via email to