diff --git a/uitid.tokens.inc b/uitid.tokens.inc index 7519be8..42efcae 100644 --- a/uitid.tokens.inc +++ b/uitid.tokens.inc @@ -18,6 +18,11 @@ function uitid_token_info() { 'description' => t('Custom tokens with values from the active UiTID user.'), ]; + $info['tokens']['uitiduser']['id'] = [ + 'name' => t("UiTID user's id"), + 'description' => t('The ID of the active UiTID user.'), + ]; + $info['tokens']['uitiduser']['first_name'] = [ 'name' => t("UiTID user's first name"), 'description' => t('The first name of the active UiTID user.'), @@ -51,6 +56,10 @@ function uitid_tokens($type, $tokens, array $data, array $options, BubbleableMet $replacements[$original] = $userInfo['https://publiq.be/first_name'] ?? ''; break; + case 'id': + $replacements[$original] = $userInfo['sub'] ?? ''; + break; + case 'email': $replacements[$original] = $userInfo['email'] ?? ''; break;