I just presented you with the solution. You check if Auth has been set
within login() then do your database updates.

On Feb 2, 1:57 pm, Johnny Cupcake <[email protected]> wrote:
> Thanks.  I am just a Cake novice--should I infer that there is no
> solution to my problem that uses AuthComponent as-is?
>
> I'm guessing I could modify a few lines in AuthComponent to add a
> callback, and get the behavior I want--but I'd rather not go down that
> road if there are simpler options.
>
> On Feb 2, 1:30 pm, Miles J <[email protected]> wrote:
>
> > I added the this functionality to one of my plugins:
>
> >http://github.com/milesj/forum/blob/master/controllers/users_controll...
>
> > On Feb 2, 1:22 pm, Johnny Cupcake <[email protected]> wrote:
>
> > > How can I run code on AuthComponent's successful login _event_?  For
> > > example, to record the login date/time in the database?
>
> > > I've tried writing my own login() action in the controller--but by the
> > > time that function executes, login has already been performed by the
> > > component--so I don't know whether the login _just occurred_, or it
> > > happened five minutes ago!
>
> > > Ideas are greatly appreciated.  Please note, I am NOT asking how to
> > > determine whether the user logged in _at some point_ in the recent
> > > past.  I want to map the event itself.

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