• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar
  • Skip to footer
WordPress develop tests

WordPress develop tests

WordPress develop tests a2z

  • Home
  • Plugins
  • Shortcodes
  • APIs
  • Classes
  • Files
  • Hooks
  • Sitemap
  • Blog
Home / APIs / WP_UnitTest_Factory_For_User::update_object() – Updates the user data.

You appear to be a bot. Output may be restricted

Description

Updates the user data.

Usage

$int|WP_Error = WP_UnitTest_Factory_For_User::update_object( $user_id, $fields );

Parameters

$user_id
( int ) required – ID of the user to update.
$fields
( array ) required – The user data to update.

Returns

int|WP_Error The user ID on success, WP_Error object on failure.

Source

File name: wordpress-develop-tests/phpunit/includes/factory/class-wp-unittest-factory-for-user.php
Lines:

1 to 4 of 4
  public function update_object( $user_id, $fields ) {
    $fields['ID'] = $user_id;
    return wp_update_user( $fields );
  }
 

 View on GitHub

Published: 26th November 2019 | Last updated: 26th November 2019

Primary Sidebar

Information

Function name: WP_UnitTest_Factory_For_User::update_object
Class ref: WP_UnitTest_Factory_For_User
Plugin ref: WordPress develop tests
Version: 5.9.3
Sourcefile: phpunit/includes/factory/class-wp-unittest-factory-for-user.php
File ref: phpunit/includes/factory/class-wp-unittest-factory-for-user.php
Deprecated?: No
API Letters: F,U,W

Footer

WordPress develop tests
WordPress develop tests
WordPress develop tests a2z
WordPress 6.4.1
WordPress a2z
WordPress core a2z
Genesis Theme Framework a2z
Jetpack a2z
WordPress develop tests
Easy Digital Downloads a2z
WooCommerce a2z
Yoast SEO a2z
WordPress Blocks

Site:  develop.wp-a2z.org
© Copyright WordPress develop tests 2014-2023. All rights reserved.


Website designed and developed by Herb Miller
Proudly powered by WordPress and oik plugins

  • Home
  • Blog
  • Sitemap
  • Sites