Insert “New User” and update/set meta data at once

What you are best off doing is hooking into user_register and from there updating the user options you want them set to. Below is an example of disabling the admin bar for new users:

add_action("user_register", "sc_set_user_admin_bar_false_by_default", 10, 1);
function sc_set_user_admin_bar_false_by_default($user_id) {
    update_user_meta( $user_id, 'show_admin_bar_front', 'false' );
    update_user_meta( $user_id, 'show_admin_bar_admin', 'false' );
}

Leave a Comment