Assign user role or read from custom wp_users table column
-
I’m developing a plugin that automatically approves comments posted by users who meet certain conditions of their accounts.
My question is whether should I assign special role to eligible users and approve comments by whoever has that role, or whether should I create custom column in
wp_users
table, save the eligibility information as a boolean value there and ask the database for this information every time any user posts a comment. I’m concerned that some WordPress update could rebuild database tables and remove the changes my plugin will have made to the database.This plugin can potentially be run on WordPress instances with hundreds of users, so I need a solution that will last. Backing up the database before every update, recovering the data from it to newly formatted database and rewriting the plugin to work with new database format is out of the question.
Kind thanks for any help.
- The topic ‘Assign user role or read from custom wp_users table column’ is closed to new replies.