Change WordPress user roles and capabilities Forums How to or FAQ How to delete role everywhere, permanently?

Tagged: 

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #3953
    [email protected]
    Participant

    I used the “Delete Role” button to delete a role, however, it still appeared in the list of roles when I clicked the “Grant Role” button.

    How can I delete a role everywhere, for all sites, permanently?

    #3956
    [email protected]
    Participant

    Also, the readme file says:
    Stable tag: 4.35.1

    #3959
    Vladimir
    Keymaster

    If you have the same roles set at all sites, this scenario will work for you:
    – go to Network admin -> Users -> User Role Editor.
    – delete selected role. This action will delete a role from the main site.
    – click “Update Network” button. This will replicate roles list from the main site to all subsites of your network.

    #3965
    [email protected]
    Participant

    Ok thanks.

    #3966
    Vladimir
    Keymaster

    Some details:

    Users which had deleted role (e.g. ‘role_1’) on other sites will be shown by WordPress with role ‘None’. If you look at such user custom capabilities you will see ‘role_1’ between them though. If WordPress does not find some permission ID between roles, it counts that it’s a custom capability directly assigned to a user.

    So if do not delete such capability from a user, user will get it as a role back in case a role with same ID will be added to a site later.

    It’s a current state. I see that some enhancement are desired here.

Viewing 5 posts - 1 through 5 (of 5 total)
  • You must be logged in to reply to this topic.