Drupal is a registered trademark of Dries Buytaert
drupal 11.3.7 Update released for Drupal core (11.3.7)! drupal 11.2.11 Update released for Drupal core (11.2.11)! drupal 10.6.7 Update released for Drupal core (10.6.7)! drupal 10.5.9 Update released for Drupal core (10.5.9)! cms 2.1.1 Update released for Drupal core (2.1.1)! drupal 11.3.6 Update released for Drupal core (11.3.6)! drupal 10.6.6 Update released for Drupal core (10.6.6)! cms 2.1.0 Update released for Drupal core (2.1.0)! bootstrap 8.x-3.40 Minor update available for theme bootstrap (8.x-3.40). menu_link_attributes 8.x-1.7 Minor update available for module menu_link_attributes (8.x-1.7). eca 3.1.1 Minor update available for module eca (3.1.1). layout_paragraphs 2.1.3 Minor update available for module layout_paragraphs (2.1.3). ai 1.3.3 Minor update available for module ai (1.3.3). ai 1.2.14 Minor update available for module ai (1.2.14). node_revision_delete 2.0.3 Minor update available for module node_revision_delete (2.0.3). moderated_content_bulk_publish 2.0.52 Minor update available for module moderated_content_bulk_publish (2.0.52). klaro 3.0.10 Minor update available for module klaro (3.0.10). klaro 3.0.9 Minor update available for module klaro (3.0.9). layout_paragraphs 2.1.2 Minor update available for module layout_paragraphs (2.1.2). geofield_map 11.1.8 Minor update available for module geofield_map (11.1.8).

registration_role

5,795 sites Security covered
View on drupal.org

Registration role lets an administrator select a role (or multiple roles) to automatically assign to new users. The selected role (or roles) will be assigned to new registrants.

Be sure these roles do not have any privileges that should not be given out to just anyone who registers.

Because we shouldn't give away any real abilities above an authenticated user by default, this module really has only a few known useful applications:

  1. If you want to assign all people who sign up after (or before) a certain time to a role to distinguish them— simply set the roles as appropriate at the appropriate time.
  2. If you have multiple sites with a shared user database table, and you want to assign users a role based on the site at which they register.
  3. If you want people who register themselves to have a distinct role from users invited by an administrator.
  4. If paired with a custom or contrib token system to restrict registration.
  5. If you want to make some fields on a content creation forms required for new users with the help of required_by_role module so existing or selected users without that role can skip filling values for these fields.
  6. If you want a "regular user" role which can have permissions which are not inherited by other roles, as authenticated user role's permissions are. This can be useful for a "Request publication" content moderation transition which regular users should have but editor users don't want to see a button for.

Or undoubtedly you can come up with your own creative uses!

Drupal roles exist primarily for access permissions, but modules such as mass contact also use roles to act on a group users.

Originally based on a code snippet by Pauly Jura. (It actually does less than the snippet, but it is a module and has a settings administration page!)

See Auto-assign role module for a more comprehensive take on role assignment, including allowing a user to select their own role.

Registration role is a very lightweight module which does not install any database tables.

Activity

Total releases
1
First release
Feb 2025
Latest release
1 year ago
Release cadence
Stability
100% stable

Releases

Version Type Release date
2.0.2 Stable Feb 13, 2025