update_user_option not working as expected
I think you need to use update_user_meta(), I may be misunderstanding what you’re trying to do though. EDIT (doesn’t work): add_action( ‘user_register’, ‘my_save_extra_fields’ ); function my_save_extra_fields( $user_id ) { update_user_meta( $user_id, ‘deposit’, 5 ); } EDIT: WORKING SOLUTION: add_action( ‘user_register’, ‘my_save_extra_fields’ ); function my_save_extra_fields( $user_id ) { global $wpdb; $cash=5; $wpdb->update( $wpdb->users, array(‘deposit’ => $cash), … Read more