WP_Application_Passwords::set_user_application_passwords() WordPress Method

The WP_Application_Passwords::set_user_application_passwords() method is used to add, update, or delete a user's application passwords. This is useful for when you need to give a user access to a third-party application that needs to authenticate with WordPress.

WP_Application_Passwords::set_user_application_passwords( int $user_id, array $passwords ) #

Sets a user’s application passwords.


Parameters

$user_id

(int)(Required)User ID.

$passwords

(array)(Required)Application passwords.


Top ↑

Return

(bool)


Top ↑

Source

File: wp-includes/class-wp-application-passwords.php

	protected static function set_user_application_passwords( $user_id, $passwords ) {
		return update_user_meta( $user_id, static::USERMETA_KEY_APPLICATION_PASSWORDS, $passwords );
	}


Top ↑

Changelog

Changelog
VersionDescription
5.6.0Introduced.

The content displayed on this page has been created in part by processing WordPress source code files which are made available under the GPLv2 (or a later version) license by theĀ Free Software Foundation. In addition to this, the content includes user-written examples and information. All material is subject to review and curation by the WPPaste.com community.