7

Daniel - have you looked at the CiviMember Roles Sync module which pretty much delivers this as you want. IE when someone joins and has a Drupal user then when they log in Drupal checks their Civi Membership status and gives them a role based on that. The Rules approach would also work, and is how we are planning on doing this for Drupal 8, funds permitting,...


6

You can use the Views Rules module: https://www.drupal.org/project/views_rules This will provide a Views Loop: from the project page: "A view loop is similar to a regular Rules loop, but allows looping over rows of view results." So enable that module, and then create a view that lists contacts that are in the group you desire. Some basic instructions ...


4

I admire the principle of not being too ambitious in building customizations, but I worry that you'd be going through far more trouble than you'd need to. You might consider just building a custom Drupal module that did exactly what you need. Set up a Drupal form with all the fields that you need. Then in the submit function, use the CiviCRM API to create ...


4

You would do this with an extension. Check out the Summary Fields extension for inspiration. It's similar to your goal, just geared toward donations and event participation.


4

Graham, you can do this with CiviRules? Trigger should be when contact is added to group, condition specifies what group and the related action is to remove contact from group.


3

Graham made a feature request and we got this feature in the CiviCRM Entity module, for doing this with Drupal Rules Just added a rules action "Unassign contact from group" to the dev release of CiviCRM 2 days ago, along with "Assign contact to group" This will be in beta7 when it gets released in a couple of weeks, after some new PRs get tested and merged ...


3

The rule will only trigger when the Drupal version of the contribution page at path /civicrm-contribution-page/(id) We haven't added a feature to trigger the rule event when the civi version of the contribution page is viewed.


3

You can use rules module where you set condition upon node submit to perform to add user to CiviCRM group. Module: Rules/ CiviRules


3

Exported Rules: The description of what I'm trying to do is below, and you can download (and/or pitch in) on the current versions of the Rules below at this GitHub repo. Problem Areas: In creating the CiviCRM Contribution record, I haven't been able to figure out how to set the Receive Date. I can't input the token for the date of the order because that ...


2

The integration of CiviMail with the rules module is primarily for workflow purposes. i.e. they allow another person to approve a scheduled email. Thus a CiviMail has to be scheduled and approved before it can be sent out (if this has been enabled within CiviMail settings screens) The action by itself does not create or schedule a CiviMail. It just approves ...


2

Check out the new CiviRules extension from ErikH and others to do that - see his answer to my question here


2

As they say ... there is a module for that:commerce civicrm You can also use rules if you want to trigger other actions but it sounds like this may cover a lot of what you need.


2

Ok so the installation and use of the Webform Rules went a long way to contributing to resolve the issue in terms of restricting the triggering of the action of creating a user and also providing the webform fields to the rule process... And Aidan's info seemed like a possible solution and provided another way of doing things (but, I think, as pointed out ...


2

Most of what you need is here: How can I create a Drupal user when someone submits a CiviCRM-Webform? based on @petednz-fuzion's blog post. It uses civicrm_entity which has seen a lot of activity since the previous question so there may be some changes but hopefully nothing that prevents you following it. For limiting action to a specific contact sub-type,...


2

The way I'm doing it is to use Path Rules module to check the CiviCRM URL for the transact page. So we look for the path say /civicrm/contribute/transact?reset=1&id=1 That triggers the rule. We then fetch the CiviCRM contact entity for the current user. The Contact entity has all of the custom data in it. We pass that to a rule component that ...


2

In case anyone needs this we ended up doing this with a simple drupal rule - Event = Content is viewed Conditions = AND user has role authenticated user, NOT user has role current member Action = Show a message "your membership has expired", repeat message = false


2

You may need to add your rule here. The one by Christia is specifically about "updating a contact record in the CiviCRM" not about creating. The only way we have made rules work for creation from webform is to add eg a Tag to the contact and then run the trigger off that. You need civicrm_entity. This is cross-posted from the Drupal SE. Here is an example ...


2

Unfortunately Drupal rules module is not triggered on CiviCRM membership CRUD function and CiviRules does but doesn't provide option to perform any CMS changes like creating OG groups in your case. I would recommend to create an extension or drupal module and use CiviCRM post hook to create OG group. eg: function extensions_civicrm_post($op, $objectName, $...


2

https://github.com/eileenmcnaughton/civicrm_entity/blob/7.x-2.x/civicrm_entity.module#L3237 remove the ampersand from the $contact parameter function civicrm_entity_contact_has_location_element_email($contact, $location_type_id) { This is a bug, can you make an issue in the CiviCRM Entity project issue queue? I need to trace back how this code got that ...


2

1/ You can do this in a Drupal Webform so that the original coach has their relationship expired 2/ we did some work for another age-based organisation to ensure that only the valid membership type was available based on the Date of Birth. It isn't something that I could just 'share' but if it helps you and you have a bit of budget we could probably extract ...


2

The good news is that it is possible to send an email with a one-time login URL using rules. There is an issue on the rules module for exactly this ability: problem with mail and one-time-login-url. A patch has been created for this issue that generates a new action in rules to generate a one-time login URL variable which you can then use to insert into an ...


1

To make this work I’m pretty sure you’ll need CiviCRM Entity module. We’ve used that to create Drupal accounts after/when a Contact purchases a Membership.


1

I remember this issue from some time in the past, probably been on stackexchange here before. In the end, we developed a new Rules condition, provided by the CiviCRM Entity module, "CiviCRM Contact is of subtype". It is in the "CiviCRM" section of the options list when you choose your condition. Give that a try, I believe it will solve your problem. It ...


1

Here's an example Rule for Creating a user after a Webform CiviCRM submission; For the Event we're creating a helper Membership (we're really just Registering people to ride their bikes in an Event) - but the Membership gives us a nice Event to trigger on; Using CiviMember to automatically create a Drupal user


1

On a node update (You can change it to node create) it captures the email address from the node i.e. directory and creates a new Drupal user and CiviCRM contact and assigns that contact to the group. { "rules_add_new_user_to_civicrm_group_working" : { "LABEL" : "Add New User to CiviCRM Group - Working with New User", "PLUGIN" : "reaction rule", "...


1

Rather than using a Rule, you could achieve this just by using Views to create a block that shows Membership status, and if you want, limit it to only show for Roles that are expired, etc. I understand I am not answering the OP of 'how to do this via Rules' but am trying to answer a more generic question "how can i show a user their membership is expired" ...


1

The extension CiviRules is maybe an option. You can find it in the extension directory https://civicrm.org/extensions/civirules and the latest documentation is at https://docs.civicrm.org/civirules/en/latest/ .


1

Well to answer this question, basically I had to write a couple of new Rules conditions. They have been added to the CiviCRM Entity project, right now they are in the -dev version. I added two new Conditions. CiviCRM Contact is of subtype, and CiviCRM Contact is in Group. They both require a civicrm_contact object is loaded in the rule, which you get ...


1

We got this working using this rule: { "rules_friends_tag_account_create" : { "LABEL" : "Self Create User Account and login", "PLUGIN" : "reaction rule", "OWNER" : "rules", "TAGS" : [ "CiviCRM", "CiviCRM User" ], "REQUIRES" : [ "rules", "civicrm" ], "ON" : { "civicrm_entity_tag_create" : [] }, "IF" : [ { "data_is" : { "data" : [ "civicrm-entity-tag:tag-id" ]...


1

There's an unreviewed patch to the CiviCRM Entity module that tackles this. To clean up and remove a tag, you can easily set up CiviRules to just delete a tag as soon as it's created.


Only top voted, non community-wiki answers of a minimum length are eligible