News:

Wondering if this will always be free?  See why free is better.

Main Menu

selectively disable logging in

Started by RolfBly, August 14, 2024, 11:23:15 AM

Previous topic - Next topic

RolfBly

Is it possible to disable logging in for all except for an admin user?

It's an old forum (2006 - 2011) that I've restored and I want to make available as a resource, but I don't want anyone to be able to log in. Except administrators need to be able te remove users when requested to do so (because GDPR). 

I used to be a member. I was able to log in with my old credentials.

Arantor

Not really, not without work - it's not how the system was designed.

What you could do is remove most permissions from people so they can't do anything if they did happen to log in, so they wouldn't be able to reply etc.
Holder of controversial views, all of which my own.


Sir Osis of Liver

How about this?

LoginOut.php

    // Just log you back out if it's in maintenance mode and you AREN'T an admin.
//    if (empty($maintenance) || allowedTo('admin_forum'))
    if (allowedTo('admin_forum'))
        redirectexit('action=login2;sa=check;member=' . $user_info['id'], $context['server']['needs_login_fix']);
    else
        redirectexit('action=logout;' . $context['session_var'] . '=' . $context['session_id'], $context['server']['needs_login_fix']);


You could add a message to the box that only admins can login, and allow guests to browse forum with no permissions.



When in Emor, do as the Snamors.
                              - D. Lister

Aleksi "Lex" Kilpinen

Quote from: Arantor on August 14, 2024, 11:27:58 AMWhat you could do is remove most permissions from people so they can't do anything if they did happen to log in, so they wouldn't be able to reply etc.
This would be the sensible way IMO, you could also still allow profile edits, reporting posts and account deletion requests through SMF, and not have to bother with alternative contact channels.
Slava
Ukraini!
"Before you allow people access to your forum, especially in an administrative position, you must be aware that that person can seriously damage your forum. Therefore, you should only allow people that you trust, implicitly, to have such access." -Douglas

How you can help SMF

RolfBly

Once again, thanks guys. I'll go with Arantor's suggestion. 

Advertisement: