Jump to content

Recommended Posts

Basically i have a problem with my site. Ive realised now if i have a mod and i see from the log that he has been doing some suspicious stuff like trying to delete the admin or is deleting threads for no reason and i want to remove his privlidges... i dont know how... i can ban him so he cant access the site, but say i just wanted to remove his privlidges.

 

Now he has a session set - so i delete him as a mod but one of the session variables still show him as a mod when the site checks... how can i unset his variable? i think it would be quite resource intensive to check the database everytime someone loads a page to check if they have a session set but are no long in the database.

Store everyone's session in the database along with their user name, then if someone is acting suspicious just delete his session so that on the next request he needs to log-in again. Or ban him and then log him out.

i think it would be quite resource intensive to check the database everytime someone loads a page to check

 

Ummm. That's exactly how almost all of the major applications that have a login in system and/or user groups/permissions/levels/access control does it.

 

For example, in most forum software, if anyone were to be banned (added to the banned group) or to be promoted/demoted, it would take effect immediately because on each page request the group membership of the visitor is checked in the database.

 

If you are going to have a user system that has mods/admins... you need a more sophisticated system than just setting a session variable and checking it on each page request.

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.