Login and Logout Redirect Per Role

Drupal Versions
D8
D9
For Installation
General

This module redirect users upon login and logout.  In addition, it provides a priority setting of precedence to take care of users who has multiple roles.  Following is a list of feature it provides:

  • Redirect user to specific URL when log in
  • Redirect user to specific URL when log out
  • Set specific redirect URL for each role
  • Set roles redirect priority
  • Use Tokens in redirect URL
  • CAS integration for Single-Sign-On

 

Installation using Composer

Follow normal module installation procedure.

 

Configure at Admin > Configuration > System > Login and logout Redirect per role, @ /admin/people/login-and-logout-redirect-per-role and make the settings accordingly, following the order of sequence in priority.  Higher in the list, higher the priority will be.

 

 

  • Note that there is a working logic of order sequence which determines the priority of precedence.  Higher in the list, higher the priority is.
  • The author experienced a system problem when logout using <front> as the logout redirection, and fixed after changing it back to /home.  It does not accept using redirect URL as <front>.  Care should be taken when using this module.

 

 

Complete module configuration page @ /admin/people/login-and-logout-redirect-per-role
Part of the module configuration (enlarged)
Part of the module configuration (enlarged)
Working logic explanation @ configuration page
Recommendation
Based on Need