Update a user option that can be either per Site or per Network.
User options are just like user metadata except that they have support for blog-specific options when using multisite. If the $global parameter is false, which it is by default, it will prepend the WordPress table prefix to the option name.
<?php update_user_option( $user_id, $option_name, $newvalue, $global ) ?>
Hide the admin bar for a user on the front end of the site:
update_user_option( $user_id, 'show_admin_bar_front', false );
When multisite is installed, the $global parameter can be used to set the user option for the whole network, instead of just the current site:
update_user_option( $user_id, 'show_admin_bar_front', false, true );
update_user_option() is located in wp-includes/user.php
.
add_user_meta(), delete_user_meta(), get_user_meta(), update_user_meta(), get_user_option(), delete_user_option(), update_user_option(),