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:
- Install the module to modules/contrib or modules folder
- Enable Login And Logout Redirect Per Role module
CONFIGURATION:
- In menu go to: Configuration -> System -> Login and Logout Redirect per role
(or/admin/people/login-and-logout-redirect-per-role
) - 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. - 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. - 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)
Project information
- Maintenance fixes only
Considered feature-complete by its maintainers. - Module categories: Administration Tools, Developer Tools, Access Control
- 3,535 sites report using this module
- Created by pratik.mehta19 on , updated
- Stable releases for this project are covered by the security advisory policy.
Look for the shield icon below.
Releases
Added support for Drupal 10
Development version: 8.x-1.x-dev updated 20 Mar 2024 at 14:13 UTC