In civicrm contact summary we see Contact ID / User ID, where User ID refers to the drupal. I will need to customize a token for this User Id which I am supposed to use in civimail. Here in this link https://wiki.civicrm.org/confluence/display/CRMDOC/Customized+%28and+Custom%29+Tokens ,drupal username can be fetched. But I need it for Drupal Id. Please suggest.


The example calls $result = civicrm_api('UFMatch', 'get', $params); to get the Drupal user id that it passes to user_load() to get the rest of the user info.

If you just want the id then it is the value being passed to user_load():

  • Thanks for the reply. Yes I got it immediately after posting the question. Sorry for not closing the question.
    – preethi
    Jun 30 '17 at 10:21

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.