$previous_data
$previous_data : null
Data that we will set before the update profile to compare it after update
Class User
$previous_data : null
Data that we will set before the update profile to compare it after update
$id : int
$usermeta : null
$data : null
$profile : null
$cannot_edit : null
$deleted_user_id : null
$banned_keys : array|string[]
$preview : bool
$send_mail_on_delete : bool
$update_user_keys : array|string[]
A list of keys that should never be in wp_usermeta.
$target_id : null
$cached_user : array
avoid_banned_keys(null|bool $check, int $object_id, string $meta_key) : null|bool
Low-level checking to avoid updating banned user metakeys while UM Forms submission.
null|bool | $check | Whether to allow updating metadata for the given type. |
int | $object_id | ID of the object metadata is for. |
string | $meta_key | Metadata key. |
on_delete_usermeta(int|array $meta_ids, int $object_id, string $meta_key, mixed $_meta_value) : mixed
When you delete usermeta connected with member directory - reset it to default value
int|array | $meta_ids | |
int | $object_id | |
string | $meta_key | |
mixed | $_meta_value |
on_update_usermeta(int $meta_id, int $object_id, string $meta_key, mixed $_meta_value) : mixed
When you add/update usermeta connected with member directories - set this data to member directory metakey
int | $meta_id | |
int | $object_id | |
string | $meta_key | |
mixed | $_meta_value |
set(null|int $user_id = null, bool $clean = false) : mixed
This method lets you set a user. For example, to retrieve a profile or anything related to that user.
null|int | $user_id | Which user to retrieve. A numeric user ID |
bool | $clean | Should be true or false. Basically, if you did not provide a user ID It will set the current logged in user as a profile |
auto_login(int $user_id, int|bool $rememberme) : mixed
This method lets you auto sign-in a user to your site.
int | $user_id | Which user ID to sign in automatically |
int|bool | $rememberme | Should be true or false. If you want the user sign in session to use cookies, use true |
get_role() : string
This method gets a user role in slug format. e.g. member
is_private_profile(int $user_id) : bool
This method checks if give user profile is private.
int | $user_id | A user ID must be passed to check if the user profile is private |
is_approved(int $user_id) : bool
This method can be used to determine If a certain user is approved or not.
int | $user_id | The user ID to check approval status for |
user_exists_by_email_as_username(string $slug) : bool
This method checks if a user exists or not in your site based on the user email as username
string | $slug | A user slug must be passed to check if the user exists |
None found |
None found |
user_exists_by_id(int $user_id) : bool|int
This method checks if a user exists or not in your site based on the user ID.
int | $user_id | A user ID must be passed to check if the user exists |
None found |
approve(bool $repeat = true) : mixed
This method approves a user membership and sends them an optional welcome/approval email.
bool | $repeat | @deprecated |
None found |
None found |
pending() : void
This method puts a user under manual review by administrator and sends them an optional email.
None found |
None found |
deactivate() : void
This method deactivates a user membership and sends them an optional email.
None found |
None found |