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: 2
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!

onoehring
AppGini Super Hero
AppGini Super Hero
Posts: 662
Joined: 2019-05-21 22:42
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
Some postings I was involved, you might find useful:
Backup your database (viewtopic.php?f=4&t=3341); Improve security (viewtopic.php?f=4&t=3168); Field Permissions (viewtopic.php?f=4&t=3308); Custom (error) message (viewtopic.php?f=7&t=1740&p=10871#p10906); Audit Log (viewtopic.php?f=4&t=1369&p=10407); Two Factor Authentication (viewtopic.php?f=7&t=3306&p=11478); Add 2nd SAVE CHANGES button (viewtopic.php?f=2&t=3242&p=11104); Place a search on details view (viewtopic.php?f=2&t=3479&p=12484#p12484); Column-Value-Based-Permissions (viewtopic.php?f=4&t=3498)

marcelo
Posts: 2
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!

pböttcher
AppGini Super Hero
AppGini Super Hero
Posts: 1091
Joined: 2018-04-01 10:12

Re: Logoff in all users

Post by pböttcher » 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)

Post Reply