hooks()
hooks() : mixed
Class Users
map_caps_by_role(bool[] $allcaps, string[] $caps, array $args) : bool[]
Restrict the edit/delete users via wp-admin screen due UM role capabilities
bool[] | $allcaps | Array of key/value pairs where keys represent a capability name and boolean values represent whether the user has that capability. |
string[] | $caps | Required primitive capabilities for the requested capability. |
array | $args | { Arguments that accompany the requested capability check.
} |
can_be_set_as_pending(int $user_id, bool $force = false) : bool
Check if the user can be set as pending admin review. Cannot set the same status but any user can be set to pending admin review.
int | $user_id | User ID. |
bool | $force | If true - ignore current user condition. |
approve(int $user_id, bool $force = false, bool $silent = false) : bool
Approve user.
int | $user_id | User ID. |
bool | $force | If true - ignore current user condition. |
bool | $silent | If true - don't send email notification. E.g. case when user already exists, but doesn't have a status. |
true
if the user has been approved
false
on failure or if the user already has approved status.