3

* EDIT * We have a multi record custom data group with a field called "Status". When this field changes value to "Completed" we want people to see specific pages in WordPress.

I have tried to setup a Smart Group and link this to a Role in Civi using Groups Role Sync, but this plugin does not work with smart groups.

I created a Parent ACL group of the smart group in question, but this is not being populated.

I've also tried creating a CiviRule to add a membership when custom fields are edited and then use the membership sync to role plugin, but CiviRules can't evaluate the values in multi record custom data groups (for understandable reasons).

So.... I was wondering if anyone had any other ideas of how we can automatically add a capability or role in WordPress based on the data in CiviCRM? Maybe someone could share some custom code for a plugin to do this, similair to this answer but for WordPress?

2

1 Answer 1

0

I'm not sure what "Groups Role Sync" is (I suspect it's a Drupal module) but you can use CiviCRM WordPress Member Sync to sync Contacts with Memberships to WordPress Users with Roles or Capabilities. FWIW, the plugin doesn't support Smart Groups either.

8
  • Thanks @christian but we need to specifcally support smart groups. This is the plugin for WordPress to do Group Role sync: develop.tadpole.cc/plugins/civicrm-groups-sync
    – Darren
    Mar 30, 2020 at 11:40
  • @Darren That plugin doesn't support smart groups either. Mar 31, 2020 at 10:14
  • Perhaps you can explain why you need the sync to be on the basis of a Smart Group? Mar 31, 2020 at 10:18
  • To clarify - Smart Groups cannot be of type "Access Control", so they shouldn't really be used for that purpose. Apr 1, 2020 at 14:02
  • We don't neccesarily need to use Smart Groups, but there doesn't seem to be another way to add a capability automatically based on data held in Civi?
    – Darren
    Apr 2, 2020 at 8:53

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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