Drupal is a registered trademark of Dries Buytaert
Protected Pages 3.0.0 Major update available for module protected_pages (3.0.0). Commerce Core 3.3.8 Minor update available for module commerce (3.3.8). Search API HTML Element Filter 1.0.7 Minor update available for module search_api_html_element_filter (1.0.7). Layout Builder Reorder 2.0.1 Minor update available for module layout_builder_reorder (2.0.1). Ban 1.1.0 Minor update available for module ban (1.1.0). Field Formatter Range 2.0.0 Major update available for module field_formatter_range (2.0.0). Field Formatter Range 8.x-1.8 Minor update available for module field_formatter_range (8.x-1.8). Varbase Media Header 9.2.1 Minor update available for module varbase_media_header (9.2.1). Search API Solr 4.3.11 Module search_api_solr updated after 14 months of inactivity (4.3.11). Content Translation Redirect Module content_translation_redirect crossed 1,000 active installs.

This module allows administrators to redirect users to specific URLs upon login or logout based on their assigned roles. You can also set a priority order for these role-based redirects.

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
1 year ago
Releases (12 mo)
0 ▼ from 1
Maintenance
Dormant

Releases

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