WP_Application_Passwords::get_user_application_password( int $user_id, string $uuid )

Gets a user’s application password with the given uuid.

Parameters

$user_id

(int) (Required) User ID.

$uuid

(string) (Required) The password's uuid.

Return

(array|null) The application password if found, null otherwise.

Source

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

public static function get_user_application_password( $user_id, $uuid ) {
		$passwords = static::get_user_application_passwords( $user_id );

		foreach ( $passwords as $password ) {
			if ( $password['uuid'] === $uuid ) {
				return $password;
			}
		}

		return null;
	}

Changelog

Version Description
5.6.0 Introduced.

© 2003–2021 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/classes/wp_application_passwords/get_user_application_password