\MainWP\ChildMainWP_Child_Users

Class MainWP_Child_Users

Manage users on the site.

Summary

Methods
Properties
Constants
get_class_name()
__construct()
get_instance()
user_action()
get_all_users_int()
get_all_users()
search_users()
edit_user()
get_user_to_edit()
new_admin_password()
new_user()
No public properties found
No constants found
No protected methods found
$instance
N/A
No private methods found
No private properties found
N/A

Properties

$instance

$instance : mixed

Public static variable to hold the single instance of the class.

Type

mixed — Default null

Methods

get_class_name()

get_class_name() : string

Method get_class_name()

Get class name.

Returns

string —

CLASS Class name.

__construct()

__construct() 

MainWP_Child_Users constructor.

Run any time class is called.

get_instance()

get_instance() : mixed

Method get_instance()

Create a public static instance.

Returns

mixed —

Class instance.

user_action()

user_action() 

User actions: changeRole, update_password, edit, update_user.

get_all_users_int()

get_all_users_int(boolean  $number = false) : array

Get all users.

Parameters

boolean $number

Number parameter.

Returns

array —

Return array of $allusers.

get_all_users()

get_all_users(boolean  $return_results = false) : array

Get all child site users.

Parameters

boolean $return_results

Whether or not to return. Default: false.

Returns

array —

Return array of $allusers.

search_users()

search_users() 

Search child site users.

edit_user()

edit_user(integer  $user_id, array  $data) : string|integer

Edit existing user.

Parameters

integer $user_id

User ID.

array $data

Data to edit.

Returns

string|integer —

Return error string on failure or user ID on success.

get_user_to_edit()

get_user_to_edit(integer  $user_id) : array

Get Child Site user to edit.

Parameters

integer $user_id

User ID.

Returns

array —

Return array of $edit_data.

new_admin_password()

new_admin_password() 

Set a new administrator password.

new_user()

new_user() 

Create a new user.