I'm trying to tell if a user account is active or not, outside of WP code, by looking at the database only. Seems like a bad practice for sure, but I'm kinda stuck in this situation and anyway, it seems interesting to me to know for sure how WP determines this.
After searching in the documentation and in the questions/answers, I couldn't find anything clear.
What I observed from the database is :
Which indicator should I use to determine if the account is active ? Seems to me that both are equivalent, but I'm not sure this is deterministic...
Could someone please confirm this or correct me if I'm wrong ?
Thanks a lot for any advice, All the best,
Mathias
I'm trying to tell if a user account is active or not, outside of WP code, by looking at the database only. Seems like a bad practice for sure, but I'm kinda stuck in this situation and anyway, it seems interesting to me to know for sure how WP determines this.
After searching in the documentation and in the questions/answers, I couldn't find anything clear.
What I observed from the database is :
Which indicator should I use to determine if the account is active ? Seems to me that both are equivalent, but I'm not sure this is deterministic...
Could someone please confirm this or correct me if I'm wrong ?
Thanks a lot for any advice, All the best,
Mathias
Well, it's actually in user_meta table.
select umeta_id, meta_value from [wp_prefix]usermeta where meta_value='hp_email_verify_key'
To unlock an unverified account, you need to set its value to NULL :
update [wp_prefix]usermeta set meta_value=NULL where umeta_id=[some_id]
Just look for an empty user_activation_key
in users
-table. If is empty, user is active. If is filled, user is inactive.