Add (prefix)_user_roles as used by WordPress
-
Hello,
I accidentally deleted
(prefix)_user_roles(Options) because I thought it was added by some membership plugins I had installed. Apparently, it was part of the WordPress system.So, could you add
(prefix)_user_rolesas used by WordPress?Thank you
-
Hi @siprof,
Are you using the latest version (0.4.1)? It’s considered as used as WordPress in the latest version 🙂
Hello,
Yes, I use the latest version (0.4.1). Apparently, if I use the default database table prefix (wp_) when I first install WordPress, the plugin recognizes it as part of the WordPress system, but if I use a custom default database table prefix (for example rX_), the plugin detects it as used by Unknown.
Thank you
@tigroumeow This is the same for me on 6.3.5 using c79imyllp_user_roles. It’s Unknown.
Thanks!
Hi guys,
You are having the issue as well with the latest release?
Hi @tigroumeow!
Yes, it’s the same on 0.4.3.
Sorry, I misunderstood the issue.
You can fix it (temporarily) in two ways:
1. Install Code Snippet (https://meowapps.com/add-custom-php-code-wordpress/) and create a snippet with this code:
add_filter( 'dbclnr_check_support_for_option', 'handle_user_roles_option', 10, 3 ); function handle_user_roles_option( $status, $option, $active_plugins ) { global $wpdb; if ( $option === $wpdb->prefix . "user_roles" ) { return [ 'status' => 'ok', 'usedBy' => "WordPress" ]; } return $status; }That will add a filter in the Database Cleaner to handle this case (Database Cleaner is built on a dynamic infrastructure like this).
2. Modify the code of the plugin directly. In the support/core.php file, there is a function core_option_to_plugin. In that one, simply add this at the end of the function (before the return), or at the beginning of it:
global $wpdb; $options[$wpdb->prefix . "user_roles"] = "WP";Please let me know if one solution or another works for you (they do the same thing, so you only need to try one). If yes, the next release of the plugin will work nicely with this option.
Thanks guys!
-
This reply was modified 3 years, 11 months ago by
Jordy Meow.
Thanks @tigroumeow!
I tried the filter option and it works! It now says it’s used by WordPress.
Awesome! =)
Super, thank you @ben72! So next version will fix that for everyone 🙂
-
This reply was modified 3 years, 11 months ago by
The topic ‘Add (prefix)_user_roles as used by WordPress’ is closed to new replies.