We are using wordpress for your website development. User is active when user_status=2 and user is inactive if user_status=0. Then what is the meaning of user_status=1.
Please provide your valuable suggestions.
We are using wordpress for your website development. User is active when user_status=2 and user is inactive if user_status=0. Then what is the meaning of user_status=1.
Please provide your valuable suggestions.
You must be logged in to post a comment.
https://wordpress.org/support/topic/what-is-the-status-of-user_status
Unfortunately, WordPress doesn’t provide native online/offline user status methods. You’ll have to implement it by yourself.
Some ideas how to implement it right, could be found in that topic:
https://wordpress.stackexchange.com/q/34429/44533
Another option is to use some 3rd-party plugin ( I can’t advice any…).
In my own solution, I’m creating
user_login
custom filed in wp_usermeta table, to check user status.Hope it helps.
From other threads I see that user_status is effectively a “dead” field. It remains in the wp_user table, but isn’t used by WP itself for anything anymore. Probably explains why wp_update_user doesn’t touch it.
FOR MORE
http://codex.wordpress.org/Class_Reference/wpdb
I might be late here but the user_status is not dead as it sounds, it is used mosty in network/multisite to mark user as spam 😉
You should probably use
add_user_meta
(WP Codex) and add a new field to your users table.Seems like the cleanest way to me and you won´t be surprised, if
user_status
gets dropped from the database some time in the future.Here are what each user_status means:
https://developer.wordpress.org/reference/functions/update_user_status/