Hi all.

I am working on an accounting general ledger plugin that I expect to use in
some projects I have planned. I would like to have a created_by field in one
of my tables set automatically, but only if sfGuardPlugin is in use in the
specific application.

Is there a way to test if sfGuard is being used for authentication?
Obviously I don't want to call any sfGuard methods if it is not installed...

i.e. in the model:

$user = sfContext::getInstance()->getUser();

if( [sfGuard in use] && $user->isAuthenticated())
{
  $this->setUserId($user->getGuardUser()->getUserId());
}

Thanks in advance
Marti

-- 
If you want to report a vulnerability issue on symfony, please send it to 
security at symfony-project.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
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/symfony-users?hl=en

Reply via email to