User Documentation

User:Key template tag

The User:Key tag allows you to send invitations/keys to an email address (or multiple email addresses) through an email notification. These "Key" Invitations have their own unique Key for the member(s) to register to your website. You can specify a custom message to each recipient, as well as pre-package their Key to be assigned to a specific member group upon completion of registration. You can further specify in your User:Register template if a Key is required and/or if the Key and email address they're registering with match the email address packaged with the Key.

NOTE: Only logged in Super Admin's can use the Key Invite feature.

{exp:user:key} content {/exp:user:key}


The following parameters are available for use:



This parameter allows you to bypass the EE message template for displaying errors, and instead show your own regular template with the error messages. Error template must follow guidelines of User Error Page.



This parameter allows you to control any form attribute for the form in your template. Simply replace attribute with an attribute name such as id, name, class, etc, and specify a value for that attribute. You can specify this parameter multiple times to control as many attributes as necessary. This would normally be done to control your form with Javascript or style it with CSS.



This parameter allows you to specify whether the invitation email should use HTML or plain text formatting. Indicate yes for HTML and no (default) for plain text.



This parameter controls the parsing method used on your invitation template. Valid parsing methods are: xhtml, br and none (default).



This parameter allows you to execute Javascript functions at form submission.



This parameter allows you specify a return URL you'd like the user to be returned to after submitting the form. If you would like to show this key on the landing page you designate, use this code: return="template_group/template/%%key%%". The key created will take the place of the %%key%% construct and you can call it into your template as a segment variable.



This parameter allows you to set the action on the form to have https://. Use for processing forms with SSL.



This parameter allows you to set the return on the form to have https://. Use for processing forms with SSL.



This parameter allows you to specify a notification template for use with invitation key notifications. Only when you provide this template will invitation emails be sent. You can use any of your site templates. The template will be used to format the email invitation that will be sent to your new potential members. See example below.



This parameter allows you to specify whether the invitation email should have word wrap turned on or off. Indicate yes to leave word wrapping on and no to turn it off.


The following variables are available for use in your Notification template:

Note: The notification template needs to be a separate EE template that contains most of the variables below, and is specified by the template parameter.



This variable is available to display the email address specified in the From field.



This variable is available to display the "from name" specified in the Name field.



This variable is available to display the unique invitation Key generated by User:Key function.



This variable is available to display the member group ID specified in the group_id field.



This variable is available to display the subject specified in the subject field.



This variable is available to display the "to email" specified in the to field.

Variable Pairs

The following variable pairs are available for use:


<select name="group_id">
    <option value="{group_id}">{group_title}</option>

This variable pair allows you to create a list of member groups in a select list or series of radio buttons to pre-assign a user to.

Form Fields

The following form fields are available for use:


<input name="group_id" />

This is an optional field. If provided, invited members will be assigned to this group ID. Otherwise, your default registration settings will be used. If self activation is in place in a site, the user will be set to Pending until they activate their account through the email link they receive. Once they activate, they are bumped to the member group indicated in the form submission that created their invitation key.


<textarea name="message"></textarea>

This field is available for inserting a custom message in your invitation email.


<input name="recipient_email" />

This field is used to enter email address(es) to which the Key invitation email(s) will be sent to. An invitation key will be mailed to all email addresses provided. Separate multiple addresses with commas.


<input name="sender_email" value="{webmaster_email}" />

This field is used to provide the email address from which the invitation email is to appear to be sent from.


<input name="sender_name" value="{site_name}" />

This field is available to provide a name from which the invitation email is to appear to be sent from.


<input name="subject" value="Invitation to join {site_name}!" />

This field allows you to provide the subject of the invitation email.


The below example is how your Invitation Key template might look like:

        <label for="recipient_email">Recipient Email</label>
        <input name="recipient_email" id="recipient_email" />
        <label for="group_id">Member Group</label>
        <select name="group_id" id="group_id">
            <option value="{group_id}">{group_title}</option>
        <label for="sender_name">From Name</label>
        <input name="sender_name" id="sender_name" value="{site_name}" />
        <label for="sender_email">From Email</label>
        <input name="sender_email" id="sender_email" value="{webmaster_email}" />
        <label for="subject">Subject</label>
        <input name="subject" id="subject" value="Invitation to join {site_name}!" />
        <label for="message">Message</label>
        <textarea name="message" id="message"></textarea>
        <button type="submit">Send Invite</button>

The below example is what your notification template might look like:


You've received a special invitation to register to Example Site!
Your invitation code is: {key}

Please follow this link to complete your registration:{key}

Thank you,

Example Site

The below example is what your Registration form would look like to accept Invite Key registrations:

        <label for="username">Username</label>
        <input name="username" id="username" />
        <label for="screen_name">Screen Name</label>
        <input name="screen_name" id="screen_name" />
        <label for="email">Email</label>
        <input name="email" id="email" />
        <label for="password">Password</label>
        <input type="password" name="password" id="password" />
        <label for="password_confirm">Confirm Password</label>
        <input type="password" name="password_confirm" id="password_confirm" />
        <label for="key">Invitation Key</label>
        <input name="key" id="key" value="{key}" />
{if captcha}
        <label for="captcha">Please enter in the word you see:</label>
        <input type="text" name="captcha" id="captcha" />
            <input type="checkbox" name="accept_terms" value="y" />
            Accept Terms?
        <button type="submit">Register</button>
{if no_results}
        You're currently logged in, and must be logged out to view this form.


Having problems setting up and/or using User? Support is offered from 10am to 4pm EST weekdays. Send us an email at and we will respond as quickly as we can.