Using additional user profile fields as variables in e-mail templates

Discussion in 'Troubleshooting' started by bjk68, Mar 23, 2009.

  1. bjk68

    bjk68 New Member

    Joined:
    Nov 15, 2008
    Messages:
    24
    In the aMember e-mail templates, you can use e-mail variables, like {$user.login}.

    When a new user signs up to my aMember protected website, I would like to receive an e-mail with all the fields, the user entered during signup. Including the additional user profile fields.

    Does anybody know how to do this?

    Solution: look at my reply further on in this thread
  2. davidm1

    davidm1 aMember User & Partner

    Joined:
    May 16, 2006
    Messages:
    4,437
    Have you tested {$user.street} etc?

    David
  3. bjk68

    bjk68 New Member

    Joined:
    Nov 15, 2008
    Messages:
    24
    Found it !!

    No {$user.my_custom_field} does not work :(

    But after some investigating how things are done in the html files with the smarty code, I found out that the custom form variables, that you can define, are placed in an array called $user.data

    When you want to print one of your custom fields anywhere in an email, you can use the following syntax:

    My custom field: {lookup arr=$user.data key='my_custom_field'}

    This works !!! :):):)

    In this example you would have added a field called 'my_custom_field' at aMember CP - Utilities - Add Fields
  4. codeispoetry

    codeispoetry aMember Pro Customer

    Joined:
    Jan 12, 2009
    Messages:
    336
    Hi bjk,

    Just saw your post. Yes, that would be a way call the custom field :)

    Lee

Share This Page