Bonjour everyone!

I am a newbie in both in Drupal and CiviCRM and I have been doing this web portal wherein the contacts are mainly in CiviCRM (civimember component). I want to synchronize it to Drupal (creating login accounts for each contact).

I followed the steps on this site: http://cfatravel.com/Synchronize%20Users-to-Contacts.html

It has been successful but when I go to my Drupal contacts, none of the civicrm contacts where synchronized. :(

Am I missing something? :(

Please help, thanks! :)

Moved per forum guidelines by VM

Comments

Rajan M’s picture

I gone though http://cfatravel.com/Synchronize%20Users-to-Contacts.html , This doc seems to be for creating civicrm account for drupal users.
If you want drupal account for civicrm contacts( if drupal account is not already available ) you may go for this
http://wiki.civicrm.org/confluence/display/CRMDOC/Creating+a+Drupal+user...

Regards,
Rajan

edvanleeuwen’s picture

Use Rules and CiviCRM entity:

EVENT

  • CiviCRM Contact has been updated
  • CiviCRM Contact has been created

CONDITION

  • NOT Drupal User Account exists for Contact

ACTION

  • Create Linked Drupal User Account

=== IMPORT

{ "rules_drupal_gebruiker_van_civicrm_contact" : {
"LABEL" : "Drupal-gebruiker van CiviCRM-contact",
"PLUGIN" : "reaction rule",
"OWNER" : "rules",
"REQUIRES" : [ "civicrm" ],
"ON" : { "civicrm_contact_edit" : [], "civicrm_contact_create" : [] },
"IF" : [
{ "NOT civicrm_entity_user_exists" : { "civicrm_contact" : [ "civicrm_contact" ] } }
],
"DO" : [
{ "civicrm_entity_action_create_user" : {
"USING" : {
"civicrm_contact" : [ "civicrm-contact" ],
"is_active" : "1",
"notify" : "0",
"signin" : "0",

 "username_format" : "first.middle.last"

},
"PROVIDE" : { "civicrm_user" : { "username" : "Created Drupal User" } }
}
}
]
}
}

Best regards,

Ed