Hey Justin, as part of the authorization, a signin() method is called on the sfGuardSecurityUser object (myUser). That's the function I would overwrite and add the logging to.
Hope this helps, Daniel On Jun 25, 7:59 am, justin_davis <[email protected]> wrote: > Yeah, that's the problem. There's a redirect at the end of the > executeSignin action that sends the user back to the page they were on > before doing the signin loop. I'm not sure how to override the signin > action to log the signin without having it redirect before it gets to > my action. > > Perhaps a symfony event? > > On Jun 24, 9:17 pm, Nickolas Daskalou <[email protected]> wrote: > > > Does the [parent::executeSignin($request)] line redirect maybe? This would > > mean no code after it would get executed. > > > 2009/6/25 justin_davis <[email protected]> > > > > Hey ya'll - > > > > I'm trying to extend the sfGuardAuth signin action, and am having > > > trouble. > > > > What I want to do is log the number of times a user has logged in > > > since registering. I've added a column to the user's profile called > > > sess_ct for logging this number. > > > > Right now, I've got this set up like this: > > > > class sfGuardAuthActions extends BasesfGuardAuthActions > > > { > > > public function executeSignin($request){ > > > > parent::executeSignin($request); > > > > $user = $this->getUser()->getGuardUser()->getProfile(); > > > $user->sess_ct = $user->sess_ct + 1; > > > $user->save(); > > > > } > > > } > > > > Obviously though, this doesn't work. I'd like to extend the > > > sfGuardAuth actions, instead of editing them (again, for obvious > > > reasons). Any ideas on the correct way to go about this? > > > > Thanks so much! > > > > Justin --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
