What function updates user_status, spam and deleted column?
-
Hi all,
I’m adding some functions to a plugin I made and I’ve hit a wall. I’m using wp_update_user() to set some of the user’s main data, and update_user_meta() to set some user’s meta data.
The problem I’m having is that neither of these functions seem to allow me to change the “user_status”, “spam” or “deleted” columns in the wp_users table. I know these aren’t exactly used much, I just want them there as an option.
For example:
wp_update_user( array ('ID' => $user_id, 'user_status' => 1) ) ;
does not work. Nor does it work for the “deleted” or “spam” columns, but works fine for every other column. I thought, on a whim, that update_user_meta() might work to set these values, but no dice – it just adds another key/value pair to the usermeta table.
Anyone have any ideas?
- The topic ‘What function updates user_status, spam and deleted column?’ is closed to new replies.