Viewing 2 replies - 1 through 2 (of 2 total)
  • I am in need of the exact same thing…also did you see this snippet?

    It syncs the UM role to a WP role…I think we need someone who can help reverse this to trigger on a WP role change and if a user exists in UM then change the corresponding role in UM.

    Hello;

    I have the exact same problem…

    I have seen the snippet of code to be placed in the themes functions.php file for syncing when a UM role changes. I think all we need is to reverse that.

    here is the snippet from your old forums.

    add_action(‘um_after_user_is_approved’, ‘sync_um_and_wp_role’, 99 );
    function sync_um_and_wp_role( $user_id ) {
    $role = get_user_meta( $user_id, ‘role’, true);
    if ( $role == ‘member’ ) {
    $wp_user_object = new WP_User( $user_id );
    $wp_user_object->set_role( ‘student’ );
    }
    }

    I think the this would help many people requesting this help

    Plugin Author Ultimate Member

    (@ultimatemember)

    Hi,

    Can you please submit a support ticket via our website so we can help you with this. You can submit a ticket on this page: https://ultimatemember.com/support/

    This doc provides instructions on how to submit a ticket:

    http://docs.ultimatemember.com/article/179-how-to-create-a-support-ticket

    Thanks

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘User Role auto update/change’ is closed to new replies.