wp_users user_status field

I have found an answer to my question here but it’s 7 years old. I simply want to know if I can use this column for my own purposes.

I’m planning to use the user_activation_key column to store a hashed key upon user registration and set an inactive flag in the user_status column. This flag will prevent users from logging in until their e-mail address has been verified.

1 Answer
1

As far as I know it isn’t used, but to avoid conflicts/problems, other plugins might use it, I’d go with adding a meta to the wp_usermeta table. There is a set of functions for handling that:

  • add_user_meta()
  • get_user_meta()
  • update_user_meta()
  • delete_user_meta()

Shouldn’t make a big difference for the functionality you want to implement, but you’re on the saver side of things.

Leave a Comment