WordPress ROLE issues with multiple products

Discussion in 'Integration' started by bennyuk1, Sep 24, 2012.

  1. bennyuk1

    bennyuk1 aMember Pro Customer

    Joined:
    Jan 12, 2012
    Messages:
    200
    I have am4.2.6, working well with WP3.3.2

    I have 120 members from an old system, I have imported them into aMember fine.

    They are all able to now subscribe to become a "Fully paid up member" to get full access to site. If they dont pay they get limited access to site.

    Public viewers can register to get very limited access to site.

    I want to only allow the existing members the option of becoming "full members" I manually gave them all a access to a product called "old members". This creates a wordpress role of "aMember Expired"

    Then when they pay their subscription they get upgraded ot the product "Fully paid up member" which I want to upgrade their wordpress role to "aMember Active".

    However, as they still have the product "old members", their wordpress Role is always stuck on "aMember Expired"????

    How can I get aMember to recognise multiple products and set wordrpress roles to the most relevant level?
  2. gswaim

    gswaim CGI-Central Partner

    Joined:
    Jul 2, 2003
    Messages:
    641
    Benny,

    You have a lot of role stuff going on. I not sure I can provide you an easy solution based on your strategy; however, I will give you a possible solution to consider.

    The typical WordPress (WP)/aMember integration does not need to touch WP roles. You can set the default role for a new user on the WP Settings > General Page. It is best to leave the setting at the default of "Subscriber". Then all users added by aMember (for whatever products they own), will have the role of Subscriber.

    It would be a rare case for you to award a user a role above Subscriber; however, you can give a user a higher role based on the ownership of an aMember product. For a comprehensive explanation of the capabilities of each WP defined role see this article.

    You should not use roles to control access to WP pages, posts, or categories. There are basically two reasons to have an aMember product assign a role to a user:
    1. A few plugins cannot be directly controlled by aMember, but can be controlled by a WP role. A good example of this is Simple Forums. aMember cannot directly control access to individual forums in this plugin but you can control access to forums based on a user's WP role. So by adding a specific role to a user with a given product, you could indirectly control access to a forum in Simple Press.
    2. If you wanted to give user's with a given membership additional WP capabilities (see this article for a full description of the roles/capabilities), this could be handled by assigning them an additional role in aMember.
    Also note that a WP user can have multiple roles; however, the WP admin interface will only show one role. This also contributes to the confusion.

    In summary, "Just Say No" to roles unless you have a compelling reason to use them.

    Hope this made sense...
  3. davidm1

    davidm1 aMember User & Partner

    Joined:
    May 16, 2006
    Messages:
    4,437
    Simplest way is to give all members the role of subscriber. Then you use the per post/page setting to the specific access you want to give to the member depending on if they have an active amember product or not.What you then rely on is if the member is active in an amember product- not a user role in wordpress.


    David
  4. bennyuk1

    bennyuk1 aMember Pro Customer

    Joined:
    Jan 12, 2012
    Messages:
    200
    Godd advice, many thanks. Looks like I'll forget about looking up Roles and stick to product specific access control

Share This Page