11

I was look in the wp_users table a " user_status " column...( all contain zero )

What works is this data?

enter image description here

2
  • A quick Google search or search here in the WordPress Stack Exchange would have revealed the answer - it's no longer used by WordPress core.
    – Mat
    Commented Apr 14, 2018 at 23:11
  • I'dont find, the results mixed my head... not using the only real thing anymore
    – l6ls
    Commented Apr 14, 2018 at 23:14

2 Answers 2

9

The user_status column in the wp_users table is no longer used by WordPress core - it just hasn't been removed. It may, or may not be used in the future. Best to leave it alone...

16
  • I am think wp used in the past "spam user", "banned user"?
    – l6ls
    Commented Apr 14, 2018 at 23:12
  • Well, for 'active', 'inactive' and 'pending activation', I believe...
    – Mat
    Commented Apr 14, 2018 at 23:15
  • so now how to set activation action?
    – l6ls
    Commented Apr 26, 2018 at 19:33
  • 1
    The other answer says that this column is used by WordPress core. How do you know that it is not used?
    – Flimm
    Commented Feb 9, 2023 at 17:10
  • @Flimm - The function that Syed linked to is deprecated. If you read the top of the page in the link they provided it clearly states: "This function has been deprecated. Use wp_update_user() instead." and also states: "Deprecated as of 3.0.2 and should not be used" As per my original answer, the column is still in the user database table, but it's no longer used by WordPress - they just haven't removed it from the DB. It may, or may not be used again in the future. But, for now, it's not used.
    – Mat
    Commented Mar 14, 2023 at 13:30
1

It is used to update the status of a user in the database. Used in core to mark a user as spam or "ham" (not spam) on multisite installs.

Status 0 is Ham
Status 1 is Spam

Again, this will not work on single site installs.

https://codex.wordpress.org/Function_Reference/update_user_status#Mark_a_User_as_Spam

11
  • Downvoted as the answer refers to a function that is deprecated. "Deprecated as of 3.0.2 and should not be used."
    – Mat
    Commented Mar 14, 2023 at 13:33
  • @Mat make_ham_user hook and user status column in db is still used in current version. Also many websites still running on php 5 and old wp they are depreciated for newer versions only click the shared link and read the docs 4th argument of the function $deprecated is added as of v3.0.2... func itself got depreciated in v5.3.0 Commented Mar 22, 2023 at 19:28
  • @Mat v5.3.0 was released after my answer was posted Commented Mar 22, 2023 at 19:53
  • Show me one WordPress website that's sitting on a PHP 5 Server :'D
    – Mat
    Commented Mar 23, 2023 at 10:02
  • @Mat You serious?? php.net/usage.php click view stats and read today's stats 22% use php 5 Commented Mar 24, 2023 at 0:34

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.