CiviCRM Community Forums (archive)

*

News:

Have a question about CiviCRM?
Get it answered quickly at the new
CiviCRM Stack Exchange Q+A site

This forum was archived on 25 November 2017. Learn more.
How to get involved.
What to do if you think you've found a bug.



  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Developer Discussion »
  • APIs and Hooks (Moderator: Donald Lobo) »
  • Check if member contact exists on Drupal registration
Pages: [1]

Author Topic: Check if member contact exists on Drupal registration  (Read 526 times)

parkej60

  • I’m new here
  • *
  • Posts: 1
  • Karma: 0
  • CiviCRM version: 3.3
  • CMS version: Drupal
  • MySQL version: 5
  • PHP version: 5.3
Check if member contact exists on Drupal registration
April 11, 2012, 12:11:43 pm
Is there a way that I can update a contact when they fill out profile fields on the Drupal registration form instead of create a new contact? Our goal is to have a Drupal user created during this process and the contact updated with the additional profile fields.

We are currently send pre-existing contacts a unique URL that would allow us to figure out their ID so we will know if they are an existing contact and can update them.

If I set the eid in hook_formBuild would it then update the contact vs create?

if ($form->getAction() == CRM_Core_Action::ADD) {
   $defaults['eid'] = '12';
   $form->setDefaults($defaults);
}


Thanks for any advice!

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Developer Discussion »
  • APIs and Hooks (Moderator: Donald Lobo) »
  • Check if member contact exists on Drupal registration

This forum was archived on 2017-11-26.