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.
1 Answer
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()
:
$result['values'][0]['uf_id'])
-
Thanks for the reply. Yes I got it immediately after posting the question. Sorry for not closing the question.– preethiCommented Jun 30, 2017 at 10:21