delete_user_option() – Deletes user option with global blog capability.

You appear to be a bot. Output may be restricted

Description

Deletes user option with global blog capability.

User options are just like user metadata except that they have support for global blog options. If the 'is_global' parameter is false, which it is by default, it will prepend the WordPress table prefix to the option name.

Usage

$bool = delete_user_option( $user_id, $option_name, $is_global );

Parameters

$user_id
( int ) required – User ID
$option_name
( string ) required – User option name.
$is_global
( bool ) optional – Optional. Whether option name is global or blog specific. Default false (blog specific).

Returns

bool True on success, false on failure.

Source

File name: wordpress/wp-includes/user.php


Lines:

1 to 10 of 10
function delete_user_option( $user_id, $option_name, $is_global = false ) {
  global $wpdb;

  if ( ! $is_global ) {
    $option_name = $wpdb->get_blog_prefix() . $option_name;
  }

  return delete_user_meta( $user_id, $option_name );
}
 

 View on GitHub View on Trac