User Registration Addon - redirect user by role to specified page


its possible redirect diffrent users with diffrent roles on spicified page when use Addon User Registration Addon ?

For example i have roles :

alfa1 ,
alfa 2

and need after user login redirect to:

alfa1 -> /alfa1-page,
alfa2 -> /alfa2-page,
beta1 -> /beta-page,
beta2 -> /beta2-page,

Its possible ?

Is the user already logged in and they already have that role? If so, the User Registration add-on is irrelevant, right?

To populate a field in the form with the logged-in user’s role, you can use this:

Then, base your conditional logic for the confirmation on that value of that field.

ok, for more details.

  1. User need be registered by User Registration Addon plugin and get specified cutom role defined on system ( its not problem - roles is already here: alfa1, alfa2 , beta1, beta2 )

  2. When user confirm account can login by Register Addon Widget (i know on this widget can set up page after login but is global for all users no matter what role have)

  3. What i need on last step is User after login must be redirect for page like this :

It will be possible define ?

The free plugin Login with Ajax can help you with that, and additionally is a great way to help your members login to your site from the front end.

1 Like

This plugin not work with User Registration Addon.

Can anyone help with hook for get diffrent redirect page after login for diffrent user roles ?

Its login process , when user already registered like as describe.

i try this but need click two times login button when redirected:

function login_redirect_custom( $login_redirect, $sign_on ) {
    $current_user   = wp_get_current_user();
    $role_name      = $current_user->roles[0];
    if ( 'administrator' === $role_name ) {
        return  home_url('/admin-panel'); 
    if ( 'alfa1' === $role_name ) {
        return  home_url('/panel-alfa1');
add_filter( 'gform_user_registration_login_redirect_url', 'login_redirect_custom', 10, 2 );

Hello ? Any one ?