This documentation relates to CiviCRM version 3.2. It's not maintained anymore.
Current version of documentation.

Create User from Contact

Skip to end of metadata
Go to start of metadata

This page refers to outdated version of CiviCRM. Check current version of documentation.


Documentation Search


CiviCRM 3.2 Documentation

Support and Participation

Developer Resources


CiviCRM book!

Make sure to check out Understanding CiviCRM as well! You can also support this project by ordering a hard copy.

here's a simple way to create a drupal user from an civicrm contact. the route i took was to make the link to the contact's user record, that shows up on the contact detail screen, change from "View User Record" to "Create User Record" if there is no user record already created. when you click on this link it brings you to the standard drupal create user screen with the user name and primary email address already filled in. (i wasn't able to figure out how to get the default password set.) This was only tested with CiviCRM 1.5.

this requires change in two files. to create the link from contact detail to add user page:
modules/civicrm/templates/CRM/Contact/Page/View/Basic.tpl

and to get contact data from civicrm into the new user form:
modules/civicrm/drupal/civicrm.module

to create the link from contact detail to add user page, add the else statement below to the if $url in: modules/civicrm/templates/CRM/Contact/Page/View/Basic.tpl

to get contact data from civicrm into the new user form, replace the case 'register' section of the civicrm_user function in: modules/civicrm/drupal/civicrm.module

Labels
  • None

Creative Commons License
Except where otherwise noted, content on this site is licensed under a Creative Commons Attribution-Share Alike 3.0 United States Licence.