Login Disable by Role
Component ID
Component name
Component type
Maintenance status
Development status
Component security advisory coverage
Component created
Component changed
Component body
A module that allows you to disable login to specified roles and also prevent new registrations and disable new password requests.
I have several sites that have a fallback solution (using dnsmadeeasy) that when the master server is unavailable for a specified period of time users are automatically rerouted to my backup server, but as they are ecommerce sites I want uses to be able to browse the site (and store) but not login and or make any changes because when the master site comes back online, I dont want to have to reconcile the data from backup to master (the master data is copied to the backup nightly). Because of the issue with the master overwriting data on the backup I have allowed configuration of what roles can login and what can not login based on the server IP (and the data is identical on each server so wont get overwritten).
This module can also be used for disabling login on a normal site (ie not a fallback situation) Just set the master server IP to that of your server and ignore the slave settings. You can then manually disable login access (and also prevent password request/account creation) and can do it for a specific role or all roles (except admin).
The current version is for drupal 7 but it should not be too difficult to mod for 6.
I am not an experienced module maker so there may be better ways of doing things but if anyone would like to take a look/give it a try, let me know. Also if you can see any pitfalls or ways it could be improved...
There is a screenshot in this post http://drupal.org/node/822414#comment-5849136
