Anonymous User
(@anonymized-3085)
reinstall the plugin you used and delete the role. then uninstall that plugin again.
But the plugin doesnt allow me to delete the role. it doesnt have that option.
Or do i misunderstood something here?
Thanx
Anonymous User
(@anonymized-3085)
ahh sorry, misunderstood I thought you’d added that yourself via a plugin.
Due to the way its stored deleting via phpmyadmin is a bad idea. So you’ll need to look for a role scoper type plugin that allows you to delete it.
I was looking around for one but i couldnt find any. Maybe can u refer me to one that can actually delete roles?
Via phpMyAdmin if any1 gimme the to-do list i can do it aswell
This is stored only in the BD or in the code aswell? i mean the base code of WP not the plugin
Anonymous User
(@anonymized-3085)
I tryed with each one of those and nothing, it seems its impposible to delete a role! lol
Rich: Does the plugins insert code into WP source files? Someone told me once that plugins does not write any code on WP core files and works using their files stored on each folder, is this true?
And plz help me out to delete this god damn role!
Thanx
ok the problem was an user were assigned to that role so i couldnt delete it. Now i fix it, leaving no users there and with a plugin i did it. Thanx for the support!
Can u answer my question of the plugin codes?
Thanx! π
Anonymous User
(@anonymized-3085)
no plugins don’t, or at least shouldn’t, alter core files.
To delete a wordpress user role you need use this two lines:
$wp_roles = new WP_Roles();
$wp_roles->remove_role("your_role");
if you want to list the roles before delete one of them:
$wp_roles = new WP_Roles();
$names = $wp_roles->get_names();
print_r($names);
no plugins needed, 100% guaranted!
@julio – cool, if you would have also mentioned WHERE to insert those lines, they might have been useful …
@candy2012 ,it can go in your theme’s functions.php file, a plugin file, etc. Put it in a function. Whatever.
@julio, you are a genius. Threw it in my header.php and refreshed my site once to make it run. Then deleted the code. I 2nd your 100% guarantee!