Title: Multiple user roles.
Last modified: August 22, 2016

---

# Multiple user roles.

 *  Resolved [DANjEEEEE](https://wordpress.org/support/users/danjeeeee/)
 * (@danjeeeee)
 * [11 years, 8 months ago](https://wordpress.org/support/topic/multiple-user-roles-1/)
 * Rather than check just the first role a user has in:
 * public function bausp_get_current_user_role() { … }
 * Should this not check all the roles which a user has?
 * I know in most cases a user would only have a single role but for sites which
   have users with multiple roles this presents a problem and potentially hides 
   content despite them having the required role.
 * This is something which I experienced with a customer website a few days ago 
   and thought that it would be beneficial if the functionality was added to the
   plugin as standard.
 * [https://wordpress.org/plugins/user-specific-content/](https://wordpress.org/plugins/user-specific-content/)

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

 *  Plugin Author [Bainternet](https://wordpress.org/support/users/bainternet/)
 * (@bainternet)
 * [11 years, 8 months ago](https://wordpress.org/support/topic/multiple-user-roles-1/#post-5230437)
 * Added better support for multiple roles per user in 1.0.2
 * thanks.
 *  [kingcodefish](https://wordpress.org/support/users/kingcodefish/)
 * (@kingcodefish)
 * [11 years, 8 months ago](https://wordpress.org/support/topic/multiple-user-roles-1/#post-5230441)
 * [@danjeeeee](https://wordpress.org/support/users/danjeeeee/) How would someone
   have multiple user roles assigned?
 *  Plugin Author [Bainternet](https://wordpress.org/support/users/bainternet/)
 * (@bainternet)
 * [11 years, 8 months ago](https://wordpress.org/support/topic/multiple-user-roles-1/#post-5230445)
 * This is how: [Multiple roles per user WordPress plugin](https://gist.github.com/nikolov-tmw/7808046).
 *  Thread Starter [DANjEEEEE](https://wordpress.org/support/users/danjeeeee/)
 * (@danjeeeee)
 * [11 years, 8 months ago](https://wordpress.org/support/topic/multiple-user-roles-1/#post-5230446)
 * ^ above is one option.
 * In my case, we have a plugin that I have developed to provide integration with
   the CRM package we sell.
 * When automatically importing and creating users, we dynamically create a role
   if needed and assign that to the user (Determined by certain conditions within
   the CRM).
 * I was leaving the user with the default role, and adding the new role as an additional
   role as this would provide extra user privileges on top of the default role.
 * Hence the reason I posted here, I had already overcame the problem myself by 
   modifying the user specific content plugin temporarily until the update was released
   a couple of days ago.

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

The topic ‘Multiple user roles.’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/user-specific-content_ffffff.svg)
 * [User Specific Content](https://wordpress.org/plugins/user-specific-content/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/user-specific-content/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/user-specific-content/)
 * [Active Topics](https://wordpress.org/support/plugin/user-specific-content/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/user-specific-content/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/user-specific-content/reviews/)

 * 4 replies
 * 3 participants
 * Last reply from: [DANjEEEEE](https://wordpress.org/support/users/danjeeeee/)
 * Last activity: [11 years, 8 months ago](https://wordpress.org/support/topic/multiple-user-roles-1/#post-5230446)
 * Status: resolved