Maybe I'm being really stupid about this, but we have a site with around 3,000 users and I want to temporarily prevent the users for around 24 hours from logging into their accounts. Is there anyway I can do this, am I missing something really simple? I'm making some changes and need to ensure that no updates are done on the site other than admin (user 1) but couldn't find anything whilst searching.

Thanks,

Adam

Comments

tnanek’s picture

You can enable maintenance mode - this will essentially replace your site with a message saying work is currently being done. Users with a certain permission will be able to log in/will remain logged in until they log out (I believe it is "administer content" though I could be wrong about that)

admin/settings/site-maintenance

tnanek’s picture

To log in, you have to go to the page "user" since the general log in won't be visible due to the site being offline.

adshill’s picture

Hi Ninja,

Thanks for the quick response, however its not really what I'm looking for - I regularly use maintenance mode which is very useful, but we only use it at night and for short periods to do updates etc. However this is slightly different in that I want the site and all of its public content to be available to visitors, but I don't want them to be able to login as when they login, they can add/edit/delete content.

So the site needs to be as normal for anonymous users, just not accessible to login for anyone other than admin.

The idea is that I'm currently migrating servers and got my TTL times all mixed up. I need to present a message to visitors on the old site that they cannot login while the DNS information propagates through the internet, and also for those few servers that don't pay attention to TTL values I need to ask them to update their DNS. This could go on for 24 hours, but potentially longer and up to 4-5 days, in which case maintenance mode wouldn't be a feasible solution.

Thanks again, any other ideas would be greatly received! Thanks,

Adam

tnanek’s picture

Well I see two options, or you can combine them in any way you see fit.

Keep a document open and record the permissions for create/edit/delete the diferent node types and comments, then just remove the permissions.

Or you can just disable the login block and add a block with the details to already logged in users/people trying to login.

adshill’s picture

Thanks Ninja,

I think these options would be possible, but a bit ugly in some ways - especially since we don't actually use the login block, but a login link to the login page - although we could still route that to a different page which is an option.

I have in the meantime found this which I think actually should do everything I need: http://drupal.org/project/maintenance_helper

I'll give it a try and then post back my findings :) Thanks again for your speedy help and useful suggestions!

Adam

yogesh1110’s picture

I have create a module which exactly suits your needs. It's right now in sandbox, there is the URL: http://drupal.org/sandbox/yogesh1110/1155096
You can download it and use it.
If you found any issue, please open an issue for that.