• So, i installed this plugin wich created a new role: “Administer Web Shop” and then i uninstalled it. Sadly this role is still there and i cant find a solution to how i can remove it.

    I had search here in the forums and in the plugins directory but i couldnt find anything.

    Anyone can tell me what i have to do to delete this user role or if theres any plugin to do it?

    Thanx in advace!

Viewing 13 replies - 1 through 13 (of 13 total)
  • Anonymous User

    (@anonymized-3085)

    reinstall the plugin you used and delete the role. then uninstall that plugin again.

    Thread Starter HotJoint

    (@hotjoint)

    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.

    Thread Starter HotJoint

    (@hotjoint)

    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)

    http://wordpress.org/extend/plugins/search.php?q=role&sort=

    if you can’t find one that does the job, let us know.

    Thread Starter HotJoint

    (@hotjoint)

    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

    Thread Starter HotJoint

    (@hotjoint)

    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.

    Thread Starter HotJoint

    (@hotjoint)

    ok thanx!

    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!

Viewing 13 replies - 1 through 13 (of 13 total)

The topic ‘Deleting a user role’ is closed to new replies.