The results of the find is an array, so Cake is doing what it's told. You will 
need to do something like:

$this->set('username', $addressee['User']['username']);

That's a guess - to check it, do this just after your find:

die(debug($addressee));

That will print the array returned by the find to screen and you'll be able to 
pick your way through to the right part.

Jeremy Burns
Class Outfit

[email protected]

http://www.classoutfit.com

On 1 Jul 2010, at 16:42, Tomfox Wiranata wrote:

> hi everyone,
> 
> i am about to implement a "forgot password" feature. for that the user
> has to enter his email adress and then receives his new password. in
> this email i want to start
> 
> Hello <username>,
> 
> you forgot.....bla bla
> 
> but i am having problems to actually get the username out of my
> database. it always says "hello array"
> 
> i am using the "find" function
> 
> $adressee = $this->User->find(array('User.email' =>$user),
> array('username'), null, false);
> 
> to set the placeholder in my email i do this:
> 
> $this->set('username', $adressee)
> ...
> ...
> $this->Email->send();
> 
> any idea how i get the actual value out of it?
> 
> thanks so much
> 
> 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

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

Reply via email to