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 »
  • Post-installation Setup and Configuration (Moderator: Dave Greenberg) »
  • drupal username as civicrm field?
Pages: [1]

Author Topic: drupal username as civicrm field?  (Read 1098 times)

mariagwyn

  • I post frequently
  • ***
  • Posts: 149
  • Karma: 4
  • CiviCRM version: CiviCRM 3.3.3
  • CMS version: Drupal 6.20
  • MySQL version: 5.2.14
  • PHP version: 5.0.91-50-log
drupal username as civicrm field?
October 08, 2009, 04:29:41 pm
I would like to include drupal usernames in civicrm mailings since it is via drupal that members login to the site.  I assume the best way to do this is with a token value from a custom field.  However, how do I create this field?  I assume that it is a 'view only' field with a php code that shows the drupal username for the corresponding record.  Has anyone done this?  Or, is there another way to go about this?

Thanks,
Maria

Donald Lobo

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 15963
  • Karma: 470
    • CiviCRM site
  • CiviCRM version: 4.2+
  • CMS version: Drupal 7, Joomla 2.5+
  • MySQL version: 5.5.x
  • PHP version: 5.4.x
Re: drupal username as civicrm field?
October 08, 2009, 06:28:31 pm

i would do this using a token hook. Check:

http://wiki.civicrm.org/confluence/display/CRMDOC/CiviCRM+hook+specification#CiviCRMhookspecification-hookcivicrmtokens
http://wiki.civicrm.org/confluence/display/CRMDOC/CiviCRM+hook+specification#CiviCRMhookspecification-hookcivicrmtokenValues

lobo
A new CiviCRM Q&A resource needs YOUR help to get started. Visit our StackExchange proposed site, sign up and vote on 5 questions

mikael.andersson@charity.se

  • Guest
Re: drupal username as civicrm field?
June 23, 2010, 02:17:27 am
Is this still the way of solving it with the latest CiviCRM release, i.e. version 3.1?

Thanks,

Mikael

Donald Lobo

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 15963
  • Karma: 470
    • CiviCRM site
  • CiviCRM version: 4.2+
  • CMS version: Drupal 7, Joomla 2.5+
  • MySQL version: 5.5.x
  • PHP version: 5.4.x
Re: drupal username as civicrm field?
June 23, 2010, 06:45:37 am

yes
A new CiviCRM Q&A resource needs YOUR help to get started. Visit our StackExchange proposed site, sign up and vote on 5 questions

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Post-installation Setup and Configuration (Moderator: Dave Greenberg) »
  • drupal username as civicrm field?

This forum was archived on 2017-11-26.