Assigning User To More Than One Role
-
Hi,
I am setting up a membership type site that will run on WordPress (WP). I plan on using a membership script called aMember to control access to specific pages/posts of the site. With the WP/aMember integration all registration and role assignment is handled by aMember, which makes the changes in the WP database.
aMember can assign a user to a role based on a subscription. For example, I will set up a free subscription product in aMember to assign the role of “Subscriber” to any user that registers with the site. The registration process is totally controlled in aMember and the role assignment is handled by aMember making the change directly to the WP database. This step would basically allow users to comment to posts.
I would then set up a paid subscription product that would assign a user to a different role (either one of the included roles or a custom on make from a plugin like “Role Manager”). For simplicity lets say I had a paid subscription product called “Premium”. When you had a valid Premium subscription, aMember would assign the role of Premium to you and you would then get to see all pages and posts that are only show to Premium users (handled with a plugin like “Disclose-Secret”).
I have set up this integration and tested it, but there is one last hurdle to deal with. Apparently WP, by default, does not allow a user to be assigned to more than one role. This is a problem since often a user will first register with the site so they can comment to posts. This assigns them to the “Subscriber” role. If they later want to purchase the Premium subscription, when aMember assigns them the Premium role, they loose the Subscriber role.
Bottom line is I really need to be able to assign a user to more than one role. As stated, aMember attempts to do this, but WP, by default will only allow one role at a time.
Based on this excerpt from an article in WP’s documentation, I have hope that there is a way to do this:
Plugin developers will likely revise the ‘standard’ Roles and Capabilities because WordPress Developers left open the future possibility of assigning a user to one or more Roles…
Before I get a bunch of posts that say try the “Role Manager” plugin by Thomas, here is an excerpt from his documentation:
If you use this Plugin to manage your WordPress, Users can belong to only one role
So, does anybody have any ideas on how to modify WP to allow a user to be assigned to more than one role or a plugin that would allow this to happen?
Thanks in advance for any help on this.
- The topic ‘Assigning User To More Than One Role’ is closed to new replies.