Doing special actoin on session generate?

Hello,

I want to implement user counter at my base application with session Id.

I store sessions in the DB using CDbHttpSession and create tbl_useronline.

I have extend CDbHttpSession and override ‘regenerateID’ function.

Is there a possibility to do some action when a session is being generated or saved new a record into database?

Thanks,

Sorry for my english a little bad.

it is an OOP framework… you can extend CHttpSession component, add your hooks in "open" method and configure application to use your component to handle session.