Kick Off Users

Hi all, is there any way, I have a POS system for my work which I have created, sometimes though it would be useful to kick a user of the system, in that I mean to destroy their session so they cannot login whilst I make updates, etc. Just curious as to how this could be done.

The easiest way i see to do this is to make an updates page and in your database make a column called site_enabled with a boolean value and if set to 1 simply redirect users to it and once your updates are done set it back to 0 and allow normal POS use.

Hey bud, good idea, yeah that’s probably the best way to do it. Cheers again :slight_smile:

In reality it might depend upon how much hate you can take from the users of your system.

If I understand correctly, the system proposed will log them out as soon as they try to interact with the system, typically when they try to save something.

The amount of hate you generate for yourself will mirror how much work they have lost when they come to save something.

If it is a few minutes at most, then that might be acceptable. If they have uploaded an image and are half way through making a bar code, or are half way through a 10000 word text description - then that might cause them, and then you, problems.

If your system is mainly read-only (ie people ordering POS) then it should not be too bad.

There are probably ways around this by issuing a warning.

So, the answer might be “it depends…”.

You could always roll out your updates at night after the days trading…

Or you could have javascript do periodic ajax calls to some sort of script and warn users that the system is undergoing maintenance and that they need to wait a bit.
Maybe even disable the forms and stuff?
Add a nice and visible overlay to add some visual dramatism?