• Resolved j232029

    (@j232029)


    Hi,

    It’s a awesome plugin I love it!

    Now, I have a question. As I modified user info and saved it (click Update profile blue button), two user roles need to redirect to two specify url.

    How could I edit the url? Thank you!

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Contributor Champ Camba

    (@champsupertramp)

    Hi @j232029

    You can try this sample code snippet:

    add_action( 'um_after_user_updated', function( $user_id ){
        
        $role = um_user("role");
        if( "administrator" == $role ){
            wp_redirect( "/administrator" );
        }elseif( "subscriber" == $role ){
            wp_redirect( "/welcome" );
        }
    });

    Regards,

    Plugin Contributor Champ Camba

    (@champsupertramp)

    Hi @j232029
    This thread has been inactive for a while so we’re going to go ahead and mark it Resolved.

    Please feel free to re-open this thread by changing the Topic Status to ‘Not Resolved’ if any other questions come up and we’d be happy to help. ??

    Regards,

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Redirect different url after saving profile with multiple user roles’ is closed to new replies.