How can we help?

The User object contains information related to a user.

Availability: The User object is available anywhere there is a user. Consequently, it's available in any email, including email blasts and Admin Email Templates. The User object is available on the personal and team (with Captain handle) fundraising pages (for defaults). The User object is also available in any editable area or dictionary entry throughout the campaign site with the handle Current_User. Keep in mind that this only recognizes a logged in user, so be sure to use an if tag or default filter to account for the non-logged in user.

Different attributes of the User object will be available depending on where it's being used. Additionally, the object handle will be different depending on where it's being used. For example, in the Online Donation Confirmation email, there are two User objects, labeled Donor and Fundraiser. To determine the proper handle in a given environment, open the Placeholders popup to see how the User object is referenced. The various possible handles for the User object are listed here:

  • User (when not otherwise specified, use this handle)
  • Current_User
  • Donor
  • Primary_Registrant
  • Registrant
  • Registered_By
  • Fundraiser
  • Captain

Attributes: The User object has the following attributes:

  • User.First_Name

  • User.Last_Name

  • User.Salutation
  • User.Suffix
  • User.Company

  • User.Email

  • User.Is_Primary
  • User.Is_Fundraiser

  • User.Is_Attendee

  • User.Is_Team_Captain

  • User.Roles (array of Role object)
  • Fundraiser extension:
    • Fundraiser.Goal_Amount
    • Fundraiser.Amount_Raised
    • Fundraiser.Amount_To_Goal
    • Fundraiser.Campaign_Name
    • Fundraiser.Fundraising_Page
    • Fundraiser.Direct_Donate
  • Registrant extension:
    • Registrant.Registration_Fee
    • Registrant.Registration_Fields
    • Registrant.Amount_Discounted

User

While the User object itself isn't very useful without attributes, you can apply filters to it directly in order to return very specific and customized information. Recommended filters are listed here:

name filter

Returns the user's full name (first and last). If there is no name listed, it will return the company name. (Note: Only works for fundraisers, not donor-only or org-level users.)

Input

{{ User | name }}

Output

John Doe

field_by_label filter

Returns the value of a custom field listed for a given user.

Input

{{ User | field_by_label: "What is your t-shirt size?" }}

Output

Medium

User.First_Name

Returns the user's first name.

User.Last_Name

Returns the user's last name.

User.Salutation

Returns the user's salutation or title.

Input

{{ User.Salutation }}

Output

Mrs.

User.Suffix

Returns the user's suffix.

Input

{{ User.Suffix }}

Output

Jr.

User.Company

Returns the user's listed company name.

User.Email

Returns the user's email address.

User.Is_Primary

Returns true if the user is the primary user among managed users within an account or if there is only one user in an account. Returns false if the user is not the primary user among multiple users in one account. Click here to learn more about primary users. Use this attribute in an "if" tag to add content that should appear for primary users only:

Input

{% if User.Is_Primary %}
    Thank you for registering other people for this campaign!
{% endif %}

If the user is a primary user, the output will be:

Output

Thank you for registering other people for this campaign!

If the user is not a primary user, there will be no output.

User.Is_Fundraiser

Returns true if the user is a fundraiser. Returns false if the user is not a fundraiser. Use this attribute in an "if" tag to add content that should appear for fundraisers only:

Input

{% if User.Is_Fundraiser %}
    Happy fundraising!
{% else %}
    Thank you for your support.
{% endif %}

If the user is a fundraiser, the output will be:

Output

Happy fundraising!

If the user is not a fundraiser, the output will be:

Output

Thank you for your support.

User.Is_Attendee

Returns true if the user is an attendee (for detailed registration campaigns, registration type "Physical"). Returns false if the user is not an attendee. Use this attribute in an "if" tag to add content that should appear for attendees only:

Input

{% if User.Is_Attendee %}
    Looking forward to seeing you!
{% else %}
    Thank you for your support.
{% endif %}

If the user is a fundraiser, the output will be:

Output

Looking forward to seeing you!

If the user is not a fundraiser, the output will be:

Output

Thank you for your support.

User.Is_Team_Captain

Returns true if the user is a team captain. Returns false if the user is not a team captain. Use this attribute in an "if" tag to add content that should appear for team captains only:

Input

{% if User.Is_Team_Captain %}
    Invite team members for a successful campaign!
{% else %}
    Thank you for your support.
{% endif %}

If the user is a team captain, the output will be:

Output

Invite team members for a successful campaign!

If the user is not a team captain, the output will be:

Output

Thank you for your support.

User.Roles

Only applies to Role Registration registrants. Returns an array of the user's roles — see Role object. Use an iteration tag to return the desired values:

Input

You have registered as:
{% for role in Registrant.Roles %}
    • {{ role.Name }}
{% endfor %}

Output

You have registered as:
• Attendee
• Fundraiser
• Volunteer

Fundraiser.Goal_Amount

Returns the user's goal amount. Use a money filter to return the value in a monetary format:

Input

{{ User.Goal_Amount | money }}

Output

$5,000

Fundraiser.Amount_Raised

Returns the amount raised by the user. Use a money filter to return the value in a monetary format:

Input

{{ User.Amount_Raised | money }}

Output

$3,200

Fundraiser.Amount_To_Goal

Returns the difference between the user's total raised and goal amount. Use a money filter to return the value in a monetary format:

Input

{{ User.Amount_To_Goal | money }}

Output

$1,800

Fundraiser.Campaign_Name

Returns the user's campaign name. This applies primarily to DIY campaigns, where fundraisers can add a campaign name to their fundraising page so as to differentiate between multiple fundraising pages. For example, a campaign name might be "My Birthday Campaign".

Fundraiser.Fundraising_Page

Returns a link that directs to the user's fundraising page. This works whether or not the fundraiser created a custom URL for their fundraising page.

Fundraiser.Direct_Donate

Returns a link that directs to the campaign's donation page with the fundraiser preselected as the recipient. 

Registrant.Registration_Fee

Returns the amount paid for registration. Use a money filter to return the value in a monetary format:

Input

{{ User.Registration_Fee | money }}

Output

$36

Registrant.Registration_Fields

Returns an array of registration fields the registrant filled out during registration. Use an array filter to display the information in a useful way:

Input

{{ User.Registration_Fields | all_info }}

Output

Registration Type: Walker
T-shirt size: Medium
T-shirt color: Blue

Registrant.Amount_Discounted

Returns the amount that was discounted for the registration. Use a money filter to return the value in a monetary format:

Input

{{ User.Amount_Discounted | money }}

Output

$10