[ Index ]

PHP Cross Reference of WordPress

title

Body

[close]

/wp-includes/ -> class-wp-application-passwords.php (summary)

WP_Application_Passwords class

File Size: 381 lines (11 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 1 class

WP_Application_Passwords:: (11 methods):
  is_in_use()
  create_new_application_password()
  get_user_application_passwords()
  get_user_application_password()
  application_name_exists_for_user()
  update_application_password()
  record_application_password_usage()
  delete_application_password()
  delete_all_application_passwords()
  set_user_application_passwords()
  chunk_password()


Class: WP_Application_Passwords  - X-Ref

Class for displaying, modifying, and sanitizing application passwords.

is_in_use()   X-Ref
Checks if Application Passwords are being used by the site.

This returns true if at least one App Password has ever been created.

since: 5.6.0
return: bool

create_new_application_password( $user_id, $args = array()   X-Ref
Creates a new application password.

since: 5.6.0
since: 5.7.0 Returns WP_Error if application name already exists.
return: array|WP_Error The first key in the array is the new password, the second is its detailed information.
param: int   $user_id  User ID.
param: array $args     Information about the application password.

get_user_application_passwords( $user_id )   X-Ref
Gets a user's application passwords.

since: 5.6.0
return: array The list of app passwords.
param: int $user_id User ID.

get_user_application_password( $user_id, $uuid )   X-Ref
Gets a user's application password with the given uuid.

since: 5.6.0
return: array|null The application password if found, null otherwise.
param: int    $user_id User ID.
param: string $uuid    The password's uuid.

application_name_exists_for_user( $user_id, $name )   X-Ref
Checks if application name exists for this user.

since: 5.7.0
return: bool Whether provided application name exists or not.
param: int    $user_id User ID.
param: string $name    Application name.

update_application_password( $user_id, $uuid, $update = array()   X-Ref
Updates an application password.

since: 5.6.0
return: true|WP_Error True if successful, otherwise a WP_Error instance is returned on error.
param: int    $user_id User ID.
param: string $uuid    The password's uuid.
param: array  $update  Information about the application password to update.

record_application_password_usage( $user_id, $uuid )   X-Ref
Records that an application password has been used.

since: 5.6.0
return: true|WP_Error True if the usage was recorded, a WP_Error if an error occurs.
param: int    $user_id User ID.
param: string $uuid    The password's uuid.

delete_application_password( $user_id, $uuid )   X-Ref
Deletes an application password.

since: 5.6.0
return: true|WP_Error Whether the password was successfully found and deleted, a WP_Error otherwise.
param: int    $user_id User ID.
param: string $uuid    The password's uuid.

delete_all_application_passwords( $user_id )   X-Ref
Deletes all application passwords for the given user.

since: 5.6.0
return: int|WP_Error The number of passwords that were deleted or a WP_Error on failure.
param: int $user_id User ID.

set_user_application_passwords( $user_id, $passwords )   X-Ref
Sets a users application passwords.

since: 5.6.0
return: bool
param: int   $user_id   User ID.
param: array $passwords Application passwords.

chunk_password( $raw_password )   X-Ref
Sanitizes and then splits a password into smaller chunks.

since: 5.6.0
return: string The chunked password.
param: string $raw_password The raw application password.



Generated: Wed May 12 01:00:06 2021 Cross-referenced by PHPXref 0.7.1