• Resolved xzoom

    (@xzoom)


    Hello!
    Do you know if it is possible to assign a profile at the time of register/sign up user?

    I think it would be something, but is not working.

    function test_wpmu_new_user( $user_id ) {
            update_usermeta ( $user_id, 'role', 'Profile1' );
    }
    add_action( 'wpmu_new_user', 'test_wpmu_new_user' );

    Thanks!

Viewing 2 replies - 1 through 2 (of 2 total)
  • We have a plugin that puts users in the subscriber role after registration. I pulled out stuff from my plugin so forgive me if there are typos/errors:

    function uscm_wpmu_activate_user($userid, $password, $meta) {
        if ( !empty( $blog_id) && is_multisite() ) {
            add_user_to_blog( $blog_id, $userid, 'subscriber' );
        } else {
            // log error
        }
    }
    add_action('wpmu_activate_user',uscm_wpmu_activate_user', 10, 3);
    Thread Starter xzoom

    (@xzoom)

    Hello! It works…

    Thanks a lot ??

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘assign a profile to a user at the time of sign up’ is closed to new replies.