Logoff in all users

The recommended method of customizing your AppGini-generated application is through hooks. But sometimes you might need to add functionality not accessible through hooks. You can discuss this here.
Post Reply
marcelo
Posts: 10
Joined: 2020-07-29 15:26

Logoff in all users

Post by marcelo » 2020-10-06 21:21

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!

User avatar
onoehring
AppGini Super Hero
AppGini Super Hero
Posts: 1156
Joined: 2019-05-21 22:42
Location: Germany
Contact:

Re: Logoff in all users

Post by onoehring » 2020-10-07 10:11

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

marcelo
Posts: 10
Joined: 2020-07-29 15:26

Re: Logoff in all users

Post by marcelo » 2020-10-12 01:16

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!

pbottcher
AppGini Super Hero
AppGini Super Hero
Posts: 1635
Joined: 2018-04-01 10:12

Re: Logoff in all users

Post by pbottcher » 2020-10-12 16:10

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)
Any help offered comes with the best of intentions. Use it at your own risk. In any case, please make a backup of your existing environment before applying any changes.

Post Reply