Simple Rule Example Using CiviCRM Entity

The new Drupal module CiviCRM Entity exposes 11 CiviCRM objects as Drupal Entities and provides rules support for these entities.  In this article I will demonstrate how to create a simple rule which creates a synced drupal user for the contact when the contact gets a membership.

This how-to assumes you have the Rules modules and the CiviCRM Entity module installed.

Create the rule:

  • admin/config/workflow/rules/reaction/add
  • for name enter Create Synced User When Contact Gets Membership
  • For React on Event: Select 'CiviCRM Membership has been created'
  • Click Save
  • Under Actions select 'Create Linked Drupal User Account'
  • Click Continue
  • The default value for the CiviCRM contact Contact Data selector field should already be correct but ensure it is: civicrm-membership:contact-id-contact
  • Check Activate account and Send ccount notification email if you wish
  • Click save

You can extend the rule

If you would like to only create the user for a specific membership type.

  • Under Conditions click the Add Condition link
  • For the Select the condition to add field select Data Comparison
  • Under Data to Compare use the data selector find the membership type id field of the membership object. It should be this: civicrm-membership:membership-type-id
  • Click Continue
  • Under Operator select equals
  • Under Data Value enter the membership type id of the membership type you'd like to create linked drupal users for
  • click save

 

Tags: 

Comments

<p>good luck &lt;a href="http

<p>good luck &lt;a href=&quot

<p>good luck &lt;a href=&quot;http://obatpembersihrahim.web.id/harga-jelly-gamat-gold-g-dan-spirulina-... />&quot;&gt;harga jelly gamat gold g dan spirulina&lt;/a&gt;</p><p><a href="http://penyababdangejalagusibengkak.obatpenyakit.co.id/obat-gusi-bengkak... Gusi Bengkak Yang Aman Untuk Ibu Hamil</a></p><p><a href="http://obatlemahsyahwatakibatdiabetes.1alternativemedicine.biz/2015/11/0... Jai Tangan Kaku Dan Kesemutan</a></p><p>&nbsp;</p><p><br />&nbsp;</p> 

good luck <a href="http:/

good luck <a href="http://penyababdangejalagusibengkak.obatpenyakit.co.id/obat-gusi-bengkak... Gusi Bengkak Karena Gigi Berlubang</a><a href="http://wulanhebal06.blogspot.co.id/2015/11/tanaman-obat-untuk-kista-bart... Obat Untuk Kista Bartholin</a><a href="http://obatpembersihrahim.web.id/obat-menghentikan-darah-haid-yang-berke... Menghentikan darah Haid Yang Berkepanjangan</a><a href="http://obatpembersihrahim.web.id/jual-jelly-gamat-gold-g-kirim-barang-ba... Jelly Gamat Gold G Kirim Barang Baru Bayar</a>

Jadilah yang terbaik, dengan

Jadilah yang terbaik, dengan memiliki tubuh langsing anda bisa tampil lebh pede di muka publik, gunakan Obat Pelangsing Slimming Capsule untuk membantuk tubuh langsing yang ideal. Dapatkan barang yang asli hanya DISINI, bayarnya setelah barang sampai.

شركة الكمال للتنظيف

  بسم الله الرحمن الرحيم هل تعبت من الحشرات المؤلمه الذى تسبب لك التعب والارهاق خلال فترت الصيف الان مع شركة الكمال سوف نعالج لك لك هذه المشكله لاننا متخصصون فى رش المبيدات ومكافحة الحشرات واننا نقدم هذه الخدمات فى كافة انحاء المملكه<a href="http://the-newstar.com/%D8%B4%D8%B1%D9%83%D8%A9-%D9%85%D9%83%D8%A7%D9%81...شركة مكافحة حشرات بالطائف</a><a href="http://the-newstar.com/%D8%B4%D8%B1%D9%83%D8%A9-%D8%B1%D8%B4-%D9%85%D8%A...شركة رش مبيدات بالطائف</a><a href="http://the-newstar.com/%D8%B4%D8%B1%D9%83%D8%A9-%D9%85%D9%83%D8%A7%D9%81...">شركة مكافحة حشرات بجازان</a><a href="http://the-newstar.com/%D8%B4%D8%B1%D9%83%D8%A9-%D8%B1%D8%B4-%D9%85%D8%A...">شركة رش مبيدات بجازان</a><a href="http://the-newstar.com/%D8%B4%D8%B1%D9%83%D8%A9-%D8%B1%D8%B4-%D9%85%D8%A...شركة رش مبيدات بحائل</a><a href="http://the-newstar.com/%D8%B4%D8%B1%D9%83%D8%A9-%D9%85%D9%83%D8%A7%D9%81...شركة مكافحة حشرات بحائل</a>والسلامه عليكم ورحمة الله وبركاته 

Menu Makanan Sehat Untuk Penderita Kanker Payudara

Others can, why can not I? It is not like that<a href="http://goo.gl/yHF23P"> Menu Makanan Sehat Untuk Penderita Kanker Payudara</a><a href="http://goo.gl/iCV2g1"> Obat Tradisional Benjolan Di Punggung Paling Ampuh dan Aman</a><a href="http://goo.gl/FxFfvs"> Obat Tradisional Penghilang Benjolan Di Anus Terbaik</a><a href="http://goo.gl/8MOJZJ"> Obat Tradisional Kanker Nasofaring Efektif Dan Aman</a><a href="http://goo.gl/pRwEUF"> Obat Telinga Bernanah</a><a href="http://goo.gl/8vXycb">Obat Tradisional Gondongan Yang Efektif</a><a href="http://goo.gl/q1kdxz"> Cara Mengatasi Detak Jantung Lemahg</a><a href="http://goo.gl/3H3c3W"> Obat Kutil Kelamin Tradisional</a>

Pages

Add new comment

Filtered HTML

  • Web page addresses and e-mail addresses turn into links automatically.
  • Allowed HTML tags: <a> <em> <strong> <cite> <blockquote> <code> <ul> <ol> <li> <dl> <dt> <dd>
  • Lines and paragraphs break automatically.

Plain text

  • No HTML tags allowed.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Lines and paragraphs break automatically.
By submitting this form, you accept the Mollom privacy policy.