Why not run this out of the User model?

Jeremy Burns
Class Outfit

[email protected]
http://www.classoutfit.com

On 15 Nov 2010, at 20:23, TimK wrote:

> Hello Everybody!
> 
> I like to write a mail distributor. It shall send an email to all
> registered users with an valid email address. The distributor has no
> table in a data base, thus I set "var $useTable = false;". But I have
> a user module including the email address of every registered user. I
> thought I can work with the hasMany relation and a find('all') but it
> does not work. Here are a view code snippets.
> 
> 
> @Mail Distributor->Model:
> var $hasMany = array(
>      'User' => array(
>        'className' => 'User',
>        'foreignKey' => 'id',
>      )
>    );
> 
> @Mail Distributor->Controller
> $email_addresses = $this->Mailinglist->find('all');
> 
> Can anyone help me here?
> Best Regards,
> Tim
> 
> 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