pfeifferNet

User_Account
in package

User account profile maintenance functionality.

  • Applies to any person with login credentials.
Tags
since
5.7.0
since
5.11.0

Deprecated global singleton.

uses
HTML_Email
uses
User
used-by
Form_User_Account

Table of Contents

Constants

ACCOUNT_EDIT_PAGE  = 'edit-account'
The user profile edit page.

Properties

$account_edit_url  : string
The fully qualified path to the user account edit page.
$instances  : array<string|int, object>
The array of instances of this class and sub-classes.

Methods

cancel_email_change()  : bool
Cancel a pending email change.
cancel_password_change()  : bool
Cancel a pending password change.
email_change_confirm()  : bool
Updates user data to use confirmed email address.
get_account_edit_url()  : string
Return the user edit account page url.
get_action_url()  : string
Return the URL with the profile edit action to take and the key.
get_instance()  : object
Creates and/or returns the instance of this class.
reset_password()  : WP_Error
Trigger the password reset process.
__construct()  : void
Initialise the class.

Constants

ACCOUNT_EDIT_PAGE

The user profile edit page.

protected string ACCOUNT_EDIT_PAGE = 'edit-account'
Tags
since
5.7.0

Properties

$account_edit_url

The fully qualified path to the user account edit page.

protected string $account_edit_url = ''
Tags
since
5.7.0

$instances

The array of instances of this class and sub-classes.

protected static array<string|int, object> $instances = array()
Tags
since
5.11.0

Methods

cancel_email_change()

Cancel a pending email change.

public cancel_email_change(int $user_id) : bool
Parameters
$user_id : int

Cancel email change request for this user.

Tags
since
5.9.0
Return values
bool

Success or failure.

cancel_password_change()

Cancel a pending password change.

public cancel_password_change(int $user_id) : bool
Parameters
$user_id : int

Cancel password change request for this user.

Tags
since
5.9.0
Return values
bool

Success or failure.

email_change_confirm()

Updates user data to use confirmed email address.

public email_change_confirm([array<string|int, string> $get_vars = array() ]) : bool
Parameters
$get_vars : array<string|int, string> = array()

{ The sanitised $_GET arguments, including a nonce. @type string $key The hashed new email address. }

Tags
since
5.7.0
Return values
bool

Success or failure.

get_action_url()

Return the URL with the profile edit action to take and the key.

public get_action_url([string $action = '' ][, string $key = '' ]) : string
Parameters
$action : string = ''

The action to take.

$key : string = ''

The hashed new email address or activation key.

Tags
since
5.7.0
used-by
Email_Reset_Email_Request::send()
Return values
string

The URL for the action.

get_instance()

Creates and/or returns the instance of this class.

public static get_instance() : object
Tags
since
5.11.0
Return values
object

The instance of this class.

reset_password()

Trigger the password reset process.

public reset_password(int $user_id, WP_Error $errors) : WP_Error
Parameters
$user_id : int

The user id requesting password reset.

$errors : WP_Error

The WP_Error object to use if errors.

Tags
since
5.7.0
Return values
WP_Error

The maybe modified error object.


        
On this page

Search results