In that case I recommend to call setUser() before you feed the form with the record. Otherwise you have to pass the user to the form, from where you have to pass it to the model, from where ... you know the drill :-)
$record->setUser($this->getUser()); $form = new Form($record); // etc. One of the most important best practices IMO is to NEVER use sfContext::getInstance() in the model layer of your application (i.e., everywhere else but the actions, where the context is available anyway). Your code will be untestable and very unflexible if you do that (see the problem of the original poster). Once you become comfortable with that thought, you see that all that's needed to do really is to pass the required objects around. Bernhard --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "symfony users" 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/symfony-users?hl=en -~----------~----~----~----~------~----~------~--~---
