Autologin notification available?


I have code in my authenticate() method of UserIdentity. However, this does not get executed when a user returns via auto-login.

Is there an event I can hook onto to put my post-login code?

I'm confused as to where this could be done.

Any help would be appreciated.

– Jerry

authenticate() is only used when you call login(). When a user is authenticated by a cookie, this method is not invoked because the user identity is restored from the cookie information. Only CWebUser::restoreFromCookie() is invoked in this case.

Yes, I found that.

I guess what I'm getting at is this:

Is there a single event or method that I can use to load information from the database about a user once he has been logged in?

Or do I do it once and store it in the user state and then each web page reads from the cache?

I think the best place to do this is in CWebUser::changeIdentity. I'm going to try that.