Page 1 of 1

Logoff in all users

Posted: 2020-10-06 21:21
by marcelo
Dear friends, I hope you are all well!

I need help. I made a table where it is possible to make an appointment for the gym, because with CORONAVIRUS it was allowed to make only one appointment per house and I live in a condominium with 88 houses.

Every Sunday, at 22h clean the database for new appointment (Monday to Friday), it happens that I have seen instant appointments right after resetting the database. Some neighbors are certainly booking them using bots.

How could I log off all logged in users by appgini or mysql? I've already put reCAPCHA to help.

Thank you!

Re: Logoff in all users

Posted: 2020-10-07 10:11
by onoehring
Hi,

just an idea: Why do you clean the database? You could let users change their appointment. The only thing you would need to make sure is, that each user has only exactly one appointment (entry in the database). And of course each user should be able to change his own records only ;-)

Olaf

Re: Logoff in all users

Posted: 2020-10-12 01:16
by marcelo
Good night friends!

The point is that users wait with the screen open, when resetting the database they just save.

What I really needed was a general logoff that would not allow saving anything before logging in.

Hug!

Re: Logoff in all users

Posted: 2020-10-12 16:10
by pbottcher
Hi,

you could use a session variable, set it to the logout time of the day (or next day if you are already later) and check in the header-extras.php if that session variable is set and the current time is greater than the time if. If so, reset the variable and force the logout (redirect to the signOut)