Description
Activates a user when moderated registration is used.
Parameters
$user_id
(int) (optional) The user ID. If no ID is passed, the current user ID will be used.
$notify
(boolean) (optional) Send email notification to user when activated. Defaults to true.
$set_pwd
(boolean) (optional) Sets a password when the user is activated. Defaults to false.
Return Value
(void)
Notes
- Triggers wpmem_user_activated action
- Also see wpmem_deactivate_user()
Examples
Changelog
- Introduced in version 2.4.0
- 3.1.6 Dependencies now loaded by object.
- 3.2.4 Renamed from wpmem_a_activate_user().
- 3.3.0 Moved to user API
- 3.3.5 Added $notify argument.
- 3.4.0 Added $set_pwd argument.
Source
wpmem_activate_user() is located in /includes/api-users.php.