Accessing User Profile Data From a Bright Template

User profile data can be made available to Bright templates via configuration options for the Bright Plugin for WordPress.

See Managing User Profile Data Syncing to Bright Server on how it is configured.

This document covers how to access this data via a Bright Template.

First you can see the data available via the use of debugging statement in your templete:

{{{debug user}}}

Which will give you and output like:

{
 "meta": {
   "user_email": "",
   "first_name": "Bret",
   "last_name": "Weinraub"
  },
 "site_roles": {
   "administrator": "true"
  },
 "email": "bret@aura-software.com",
 "avatar": ""
}

If you see your field there, you can the address it via the template:

My email is {{user.email}}.

Which will render as

My email is support@aura-software.com

If you don't see the profile field you want here, make sure it is exported. Check Managing User Profile Data Syncing to Bright Server