The effects of alcohol on sustanon 250 leucine for – real weight loss & bodybuilding benefits?
How to Remove (Old)...
 
Share:
Notifications
Clear all

[Solved] How to Remove (Old) User Roles

14 Posts
3 Users
1 Reactions
1,478 Views
Posts: 88
Topic starter
(@aerostar)
Estimable Member
Joined: 4 years ago

Good Day!

Over time, some plugins add new "User Roles" to WordPress. Eventually, these new "User Roles" are not needed. Well, we deleted all unnecessary "User Roles" from our website using the proper plugin, but they still appear in your plugin settings.

Click here: http://prntscr.com/sxfdth

How can we delete these unnecessary "User Roles"? Perhaps there's a database table we can edit?

As always, thank you for your support.

Cheers!

13 Replies
Asti
Posts: 7617
 Asti
Support
(@asti)
Illustrious Member
Joined: 7 years ago

Hi @aerostar,

We'll check and back to you asap. 

12 Replies
(@aerostar)
Joined: 4 years ago

Estimable Member
Posts: 88

Hi @asti,

Well, we found the reason why there are so many "User Roles" in your plugin. Looks like they were purposely added to your plugin to support many "scenarios." (i.e., you added the most popular user roles to the plugin). Click here.

Not sure they need to be deleted at this point, but sure would be nice if your plugin loaded at first the basic WordPress "User Roles" and then, as website owners add new "User Roles, your plugin will detect them and add them/delete them, as applicable. That would be a dynamic operation with complex coding involved.

Oh well, your call on how to address this. Thank you.

Cheers!

 

 

 

Asti
 Asti
Support
(@asti)
Joined: 7 years ago

Illustrious Member
Posts: 7617

@aerostar,

Those roles were saved in the database. They are not displayed in the frontend anyway, just in the wpDiscuz settings. Also, it doesn't have any effect on a plugin work. If they are somehow disturbed you please send us the login details. I'll ask the developers to remove those user roles for the list. 

(@aerostar)
Joined: 4 years ago

Estimable Member
Posts: 88

@asti,

As suspected, thank you! 

For future reference, can you provide the name of the database containing these roles and the proper SQL command to delete these roles? 

As an option, you can also provide the SQL search term(s) to find them.

Again, thank you!

 

Tom
 Tom
Support
(@tomson)
Joined: 9 years ago

Honorable Member
Posts: 506

@aerostar

There are many plugins which allow removing user roles. Please use one of them: https://wordpress.org/plugins/search/delete+user+role/

(@aerostar)
Joined: 4 years ago

Estimable Member
Posts: 88

@tomson,

We already did that. The plugin(s) you are referring to delete "User Roles" at the admin level. They did not delete the "User Roles" that are hard-coded into your plugin (i.e., tables). @asti agrees and knows what we're talking about.

Again, if at all possible, kindly provide info requested.

Thank you!

Tom
 Tom
Support
(@tomson)
Joined: 9 years ago

Honorable Member
Posts: 506

@aerostar,

wpDiscuz doesn't have any hard coded roles. It seems the user roles are saved in each user usermeta table by WordPress. 

(@aerostar)
Joined: 4 years ago

Estimable Member
Posts: 88

@tomson,

We'll explore this a bit more. We used several "User Role" editing plugins and they did not appear (nor delete) the "User Roles" displayed in your plugin settings (link provided above).

Also, we just checked our usermeta table and the "User Roles" do not appear there.

So, in short, your plugin is apparently "not communicating" with these other plugins.

While we work on this a bit more, can you tell us what file/hook generates or embeds the "User Roles" listed in your plugin settings?  For example, the ones listed here: http://prntscr.com/sxfdth

Thank you.

(@aerostar)
Joined: 4 years ago

Estimable Member
Posts: 88

@tomson,

To be more specific, we installed the plugin Members, deleted all unwanted roles, and kept only the ones shown here. Afterwards, we deactivated your plugin, flushed all cache, then reactivated your plugin. The unwanted "User Roles" still show up in your plugin as shown here.

Cheers!

 

Tom
 Tom
Support
(@tomson)
Joined: 9 years ago

Honorable Member
Posts: 506

@aerostar,

Ok, the list of roles in the wpDiscuz settings page is correct, but the problem only exists with the label names. This is a serialized array in the database and it's not easy to update. You should copy it, unserialize, delete unnecessary once, then serialize it back and update the option. I'm sorry but I can't guide how to do that, there is no easy steps.

These options should not cause you any trouble, they should not be displayed  on the front-end so you can ignore them.

(@aerostar)
Joined: 4 years ago

Estimable Member
Posts: 88

@tomson,

OK. I"ll buy that! 🙂 

Do you know in what database table the array resides in?

Last, please know we appreciate very much your support. We already left an excellent review for your plugin, and expect to purchase your add-ons as our website (viewership) grows.

Again, thank you!

Asti
 Asti
Support
(@asti)
Joined: 7 years ago

Illustrious Member
Posts: 7617

@aerostar,

Do you know in what database table the array resides in?

We don't recommend you to touch the database.

Please wait for the next update. The developers will include the functions that'll remove the deleted user roles.

(@aerostar)
Joined: 4 years ago

Estimable Member
Posts: 88

@asti,

Perfect, thank you.

Cheers!

Share: