Auto Logout In Yii

Hi there,

I have a circumstance that calculates the user working time, every user has to login and logout per day. Of course when day logout, I will store the time in my table, let call it "tbl_Checkin".

So, I have 2 problems:

  1. When the user did not logout of the system, that means I cannot keep track the logout time of them -> Can not calculate the total time that the user worked

  2. When the user work as OT, so they have to be alert and make a confirm their working extra times, so the system won’t logout the user.

In the first situation, I want to set up a time limit for the user, if after 17:30 they still stay in the system, I could ask or auto logout and save the time

But how can I create a trigger time in Yii?

Any suggestion to solve my problems?

Thanks

Hi

make a cronjob that checks which user -that have already login- has no activity for a certain time (like session timeout time) and make what every you want for the users.

Thanks very much,

Yes, I’ve thought about Cronjob, thanks for your suggestion. I’ll try and feedback in this topic.