Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

What happens if i assign let's say 2 different (custom) roles to a user that both of which have the same (custom) capability?

share|improve this question
    
user will have all the capabilities. Why would you want to do this in the first place you should just make one custom role with all the capabilities needed to avoid confusion. –  Jacob Rambo Feb 14 at 16:27
    
@JacobRambo : it seems quite reasonable to me to have Roles share capabilities. –  s_ha_dum Feb 14 at 16:52
    
That seems reasonable to me too. But the OP is asking about assigning a user multiple roles. What would be the need for a user to have more than one role? I didn't even think that it was possible by default to do that in wordpress. –  Jacob Rambo Feb 14 at 17:06
    
If you understand "Roles" as "groupings of capabilities" which is the only way they make sense to me, then it is not hard to imagine wanting to put someone in two different groups. –  s_ha_dum Feb 14 at 18:45

1 Answer 1

up vote 2 down vote accepted

I am pretty sure that nothing would happen other than the user would have the capability in question.

Think about it. The default Roles share many capabilities-- Authors, Editors, and Administrators all have edit_posts, for example. All roles (usually) have read

The same system manages both default and custom roles/capabilities, so there really should be no problem.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.