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).

login_redirect_per_role

4,309 sites Security covered
View on drupal.org

ABOUT:

Module provides ability:

  • Redirect user (to specific URL) on Log in
  • Redirect user (to specific URL) on Log out
  • Set specific redirect URL for each role
  • Set roles redirect priority
  • Use Tokens in Redirect URL value
  • CAS integration

Roles order in list (configuration form) is their redirect priorities: higher in list - higher priority.

Live demo: https://youtu.be/dzLwguiJdYQ

Working logic:

For example, you set roles ordering as:

+ Admin
+ Manager
+ Authenticated

It means: when some user log in (in case of "Login redirect" table, configuration form) or log out (in case of "Logout redirect" table, configuration form) module will check:

Does this user have Admin role?

  • Yes and Redirect URL is not empty: Redirect to related URL
  • No or Redirect URL is empty:

Does this user have Manager role?

  • Yes and Redirect URL is not empty: Redirect to related URL
  • No or Redirect URL is empty:

Does this user have Authenticated role?

  • Yes and Redirect URL is not empty: Redirect to related URL
  • No or Redirect URL is empty: Use default Drupal action

INSTALLATION:

  1. Install the module to modules/contrib or modules folder
  2. Enable Login And Logout Redirect Per Role module

CONFIGURATION:

  1. In menu go to: Configuration -> System -> Login and Logout Redirect per role
    (or /admin/people/login-and-logout-redirect-per-role)
  2. Set 'Login redirect' table "Redirect URL" values and roles priority (order in table)
    to setup redirect user on Log in action.
    Or leave "Redirect URL" values empty if you don't need redirect on user Log in.
  3. Set 'Logout redirect' table "Redirect URL" values and roles priority (order in table)
    to setup redirect user on Log out action.
    Or leave "Redirect URL" values empty if you don't need redirect on user Log out.
  4. Click "Save configuration" button.

SIMILAR MODULES:

Drupal 8:

  • Redirect after login provides simple redirect to certain page for any user after login.
  • Login Destination it's a great complex solution which provides ability to redirect user on: Login, Logout, Registration, One time login by link to different pages depending from: User role or Current site language.

Comparison with similar modules

Login And Logout Redirect Per Role provides the middle solution (between these 2 modules). It's:

  • Lightweight as Redirect after login
  • Provides ability to set different destination pages after Login and Logout for users with different roles as Login Destination
  • Provides unique functionality: Ability to set per role redirect priority (see "Working logic" section)

Activity

Total releases
1
First release
Jun 2025
Latest release
9 months ago
Release cadence
Stability
100% stable

Releases

Version Type Release date
8.x-1.11 Stable Jun 26, 2025