• Resolved prdufresne

    (@prdufresne)


    This is a great tool, however it would be helpful if there was an option to map more statuses to more roles. For example, in our case we treat New, Current and Grace as Current members and we treat everything else as expired. However, We have other statuses that shouldn’t have the same access as “expired”.

    I see two options:

    Allow users to map a WordPress Role to each status individually (instead of just current or expired) or allow the user to add more Status.

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author Christian Wach

    (@needle)

    Thanks for the suggestion. I agree that the Current/Expired mapping is too simple for some cases. Realistically, however, this would involve a substantial rewrite of this plugin and is unlikely to happen.

    What I would do instead is to use Memberships in combination with BuddyPress groups and BP Groups CiviCRM Sync for more granular control. There are hooks in this plugin that you can use to add/delete users from groups, though you would have to query their Membership type and status before doing so. You would then be able query role and group membership to determine a user’s capabilities.

    Cheers, Christian

    Thread Starter prdufresne

    (@prdufresne)

    Thank you Christian,

    I looked into this. Since we don’t run BuddyPress, this would require that we some significant overhead that we don’t need. Maybe there’s something I can do in CiviCRM.

    Plugin Author Christian Wach

    (@needle)

    What I could do is add an action to the rule_apply method so that you can hook into the completed process for each user and refine the final role that is applied to them based on the $status_id and $membership_type_id of the membership. Let me know if this would be helpful.

    Cheers, Christian

    Thread Starter prdufresne

    (@prdufresne)

    I spoke with our site administrator, and we can work with that.

    ThanX!

    Plugin Author Christian Wach

    (@needle)

    I’ve added the actions to the plugin on its GitHub repo. Please review and let me know if they are suitable for your needs. If they are, I’ll release a new version here.

    Cheers, Christian

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘More Membership Mapping Option’ is closed to new replies.