Disable login to all users
I have a login page created with SA, used by registered site users.
I would like to disable and enable the login (globally) by using a recordset as a trigger, where if empty the login remains enabled. The recordset looks at a separate mysql table which has a simple '0' & '1' switch that is updated dynamically in the admin area.
If the login fails because the recordset returns an empty row (the lock is enabled), the user is directed to a landing page explaining the event.
This however is causing the user to redirect back to the login page after submitting their credentials.
Would be interested to hear alternative methods to achieve this functionality?