Set login/logout redirection rule for users with multiple roles

2 min read

When managing users with different roles in a system, it’s crucial to set up clear redirection rules for login and logout. This guide will help you create these rules so users are directed to the correct dashboard or page based on their role. Proper redirection improves navigation and workflow efficiency, making it easier for users to find what they need.

This document outlines the redirection requirements for users upon their first login based on their assigned roles. From our users’ website configurations, They want User A to go to Page A, and User B to go to Page B on their first logins. Otherwise, both Users A & B will be redirected to Page C after they complete their first logins.

The guide below will walk you through the steps to set up these redirection rules, ensuring that users are efficiently navigated to the appropriate pages based on their unique access needs. By following these instructions, you can improve usability and accessibility for all users.

How to Set a Redirection Rule for Users with Multiple Roles #

To set up redirection rules for users with multiple roles in WordPress, follow these steps:

  1. Go to your WordPress dashboard.
  2. Navigate to LoginWP.
  3. Select Create a Redirection Rule.

This will help ensure users are directed to the right page based on their role.

Setting Up Redirection Rules

Select a condition and choose User Role.

Select Condition

On the other side, select a Role based on desired preferences.

Select Role

How to Set a Priority for Users with Multiple Roles #

For Users with multiple roles, the Order function should be utilized to prioritize the role based on the Users you want to be redirected.

To add an Order based on the prioritized Role, Type or click the arrow up/down to insert a value on the text box. Zero (0) being the highest and greater than two (1) being the lowest order.

Adding Order

Don’t forget to Save Rule after setting up your redirection rules.