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) »
  • Support »
  • Using CiviCRM »
  • Using Core CiviCRM Functions (Moderator: Yashodha Chaku) »
  • Adding link to Drupal user account to your mailings, Drupal UID as External ID
Pages: [1]

Author Topic: Adding link to Drupal user account to your mailings, Drupal UID as External ID  (Read 1757 times)

amazon

  • Guest
Adding link to Drupal user account to your mailings, Drupal UID as External ID
July 24, 2007, 09:52:05 am
I wanted to put all Drupal users since a specific date, say January 1, 2007 in a group.  I found the User account closest to the that date, and then used that uid as the mark for all accounts created after Jan 1, 2007. I had done a CiviCRM re-import so I could not trust the CiviCRM created date.

CiviCRM stores Drupal User ID in the civicrm_uf_match table.  I exported contact id, drupal user id, and email.

select contact_id,uf_id,email INTO OUTFILE '/tmp/contact-since-jan2007.text' FIELDS TERMINATED BY ',' OPTIONALLY ENCLOSED BY '"' LINES TERMINATED BY '\n' from civicrm_uf_match where uf_id > ####;
 
I then took this file and imported into CiviCRM.  I removed the "" from the email address, and added header columns to the data.  I select first row has header, contact import type update.  I then added all the import into a new group sincejan07.

Now my contacts have an external id, and belong to this group.  I can do targeted mailings based on Drupal account creation date, and my mailing can have a link to http://domain/user/{external_id}* so users can be directed right to their profile to update.

I hope you find this useful.

*i hope

« Last Edit: July 24, 2007, 10:05:00 am by amazon »

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using Core CiviCRM Functions (Moderator: Yashodha Chaku) »
  • Adding link to Drupal user account to your mailings, Drupal UID as External ID

This forum was archived on 2017-11-26.