Contributors cannot have additional roles

Hi there,

I have seen that a user who lists a service will automatically get the contributor role assigned in WordPress. Now I installed a plugin to edit roles and add additional roles to users but there is one problem.

When I try to assign another role to a contributor and then update the user, the role gets automatically deleted again and the user only is contributor again. If I assign that user as an editor and then add another role, it works. Is there a reason for that or a solution that lets me assign additional roles to a contributor?

Best,

Leon

Hi,

Thank you for reporting this issue. We have found that the user’s current role is being replaced instead of having the new capability added, which occurs when the role lacks the edit_posts capability.

As a temporary solution, please change the function from set_role to add_role in this line.

1 Like

Hi,

Thank you for the help!

1 Like