Table of content

How to redirect user depending on role?

By combining the ‘nsl_login’ action and the ‘{{provider-id}}_login_redirect_url’ filter, you can control where the user with a specific role should land.

Example

In this example, you can see a basic code snippet which redirects the users with the “subscriber” role to a custom link.