This project is not covered by Drupal’s security advisory policy.
Introduction and motivation
This is a small utility module that serves that provides one simple functionality - blocking users belonging to selected role (or roles) from login in to the website.
Codebase of this module is quite small, as it includes only few hooks and functions. Anyway, as this logic looks like something that can is quite independent logic, and can be reused in different projects - I decided to create module instead of repeating code in different places.
Case study for such module can be for example integration with login toboggan, where users can set their password and login into website with smaller permissions, but still they are authenticated users. So, role of blocked_role module is simple prevent such users from getting into website, before they validate their email addresses.
Setup
This module doesn't provide UI for configuration, and it depends on content of blocked_role variable. As it's a utility module, rather for developers, I suggest to use drush to configure it:
php -r "print json_encode(['Name of role']);"|drush vset --format=json blocked_role -
As you can see, blocked_role variable is array, and elements of this array are names of roles. After setting this variable, module should work as designed.
Project information
- Minimally maintained
Maintainers monitor issues, but fast responses are not guaranteed. - Maintenance fixes only
Considered feature-complete by its maintainers. - Module categories: Developer Tools
- 1 site reports using this module
- Created by jsobiecki on , updated
- This project is not covered by the security advisory policy.
Use at your own risk! It may have publicly disclosed vulnerabilities.