Thanks, Nicolas. But I get: >> propel load data from "/home/projects/...inah-2.0/symfony/data/fixtures" PHP Warning: session_start(): Cannot send session cookie - headers already sent by (output started at /usr/share/pear/symfony/vendor/pake/pakeFunction.php:366) in /usr/share/pear/symfony/storage/sfSessionStorage.class.php on line 77
Warning: session_start(): Cannot send session cookie - headers already sent by (output started at /usr/share/pear/symfony/vendor/pake/pakeFunction.php:366) in /usr/share/pear/symfony/storage/sfSessionStorage.class.php on line 77 PHP Warning: session_start(): Cannot send session cache limiter - headers already sent (output started at /usr/share/pear/symfony/vendor/pake/pakeFunction.php:366) in /usr/share/pear/symfony/storage/sfSessionStorage.class.php on line 77 Warning: session_start(): Cannot send session cache limiter - headers already sent (output started at /usr/share/pear/symfony/vendor/pake/pakeFunction.php:366) in /usr/share/pear/symfony/storage/sfSessionStorage.class.php on line 77 [sfException] Call to undefined method sfUser::getUserId Nicolas Perriault wrote: > 2008/5/20 Tom Haskins-Vaughan <[EMAIL PROTECTED]>: > >> Everything works fine, except when I run the propel-load-data task, >> because of course there is no session. > > I may be missing the point but here's what I'd do: > > public function save($con = null) > { > if (!$user = sfContext::getInstance()->getUser()) > { > return parent::save(); > } > > if ($this->isNew()) > { > $this->setCreatedBy($user->getUserId()); > } > > if ($this->isModified()) > { > $this->setUpdatedBy($user->getUserId()); > } > > parent::save(); > } > > ++ > -- Tom Haskins-Vaughan Temple Street Media: Design and Development for the Web [EMAIL PROTECTED] | www.templestreetmedia.com --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "symfony users" group. To post to this group, send email to symfony-users@googlegroups.com 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 -~----------~----~----~----~------~----~------~--~---