delete_user_option() – Delete 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 '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, $global );

Parameters

$user_id
( int ) required – User ID
$option_name
( string ) required – User option name.
$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 8 of 8
function delete_user_option( $user_id, $option_name, $global = false ) {
  global $wpdb;

  if ( ! $global ) {
    $option_name = $wpdb->get_blog_prefix() . $option_name;
  }
  return delete_user_meta( $user_id, $option_name );
}
 

 View on GitHub View on Trac