Forum Replies Created
Viewing 1 post (of 1 total)
- AuthorPosts
Gabriel CostaParticipantHey Hasnain, tks for your reply, but it’s not working. I tried =(
look.add_action( 'user_register', 'my_custom_user_role_cb', 10, 1 ); function my_custom_user_role_cb( $user_id ) { if ( isset( $_POST['radio_5'] ) ) { update_user_meta($user_id, 'role', 'custormers'); // wp_update_user( array ('ID' => $user_id, 'role' => 'customers' ) ) ; } }I think the problem is with the $user_id, It’s return ‘null’.
Some thing else?
- AuthorPosts
Viewing 1 post (of 1 total)
