Need to execute logic on autologin

Hi,

I’m using autologin with my app and it works great. I just recently added some logic to help me to get some user usage stats but noticed that this logic is being called only when someone logs in explicitly, if they log in using autologin then the logic is not running. The logic I added was on the controller method so obviously its not being called when someone logs in using autologin.

I’m just wondering if anyone can advise on where would be the best place to put this bit of logic so that it gets called whether you are logging in explicitly or using autologin.

Thanks

Ziad

I guess this is the best place to do it:

http://www.yiiframework.com/doc/api/1.1/CWebUser#afterLogin-detail

So I guess I just extend the base CWebUser with my own and override this method. Will try that out.