update_user_status
- update_user_status is deprecated since version 5.3.0!
Alternative: wp_update_user()
update_user_status ( $id, $pref, $value, $deprecated = null )
Parameters:- (int) id The user ID.
- (string) pref The column in the wp_users table to update the user's status in (presumably user_status, spam, or deleted).
- (int) value The new status for the user.
- (null) deprecated Deprecated as of 3.0.2 and should not be used.
See:Returns:- (int) The initially passed $value.
Defined at: - Introduced in WordPress: 3.0.0
- Deprecated in WordPress: 5.3.0
Description
Update the status of a user in the database.Previously used in core to mark a user as spam or "ham" (not spam) in Multisite.