Building closed community with ExpressionEngine has just become easier! Generate signup codes from CP, or let people generate them on frontend. View usage stats, associate users with people they invited, - and event let them earn credits for bringing referrals.

General concepts

There are several potentional areas of use for invitations on your site:

Using invitation

Using invitation during signup

To let people apply invitation code during signup, simply add input field named "invitation" to registration form.

<br /><input type="text" name="invitation" value="" />

Applying invitation by existing user

You can also let existing users apply invitation codes to their account. Please refer to tags reference.

Control Panel


If you have MSM installed, setting are saved separately for each site.

The available settings for Invitations module are:

Invitation is required? - mark the checkbox if the users can sign up only of they know invitation code

Freeform from that requires valid invitation - if checked, given forms created using Freeform module can be submitted only if "invitation" field is submitted and contains valid code

Default members group to assign - if you want to use separate membership group for people who sign up using invitation, you can define default one here (can be overridden during code generation)

Default credits for invitation author - define the amount of credits that will be added to author's account when invitation is used (requires Credits module)

Default credits for invitation user - define the amount of credits that will be added to user's account when invitation is used (requires Credits module)

Invitations list

The homepage of module's Control Panel shows list of all invitations available for your site(s). You can filter to show all/expired/used/available and also define how many you want to show per page.

You can also change sorting order by clicking on head for the column you want to sort by (on-page sorting only, does not influence results on other pages, if you have paginations)

Invite usage stats

You can access invite details by clicking stats icon from invitations list. You will see the full details for selected code as well as when it has been used and by whom. If the date of usage is not shown, it means that the user has not yet completed the registration (or not approved yet).

Generating invitation code

Click "Generate" button at the right top to create new invite code.

Enter any word to be used as code, or click '(Generate)' to get an authomatic one. You can also leave the field empty to use authomatic value.

Define membership group to be assigned after registration is complete.

If you want to restrict invite code to be used only with certain email address (i.e. only by certain person), enter that email into Restrict to email address field.

Set number of times the code can be used (defaults to one time) or mark checkbox to use no limit.

You can also optionally set the date when the code will expire and can not be used anymore.

If you have Credits module installed, you can also set Credits for invitation author and user. The amounts will be added after invitation code is used (by new or existing user). For new user, the credit is applies only after the registration is complete (email address validated, or manually validated by admin - if you use that kind of validation). For existing users, the code can be used (and credit is applied) only if code usage will result in change of membership group.

Batch code generation

You can generate several codes at once by clicking 'Batch Generate'. All fields are the same, except that you are forced to use auto-generated values for invitation codes. You'll also be asked about number of invites you want (defaults to 5).

Template tags

Generate invitation code

You can let your existing users invite other people by generating invitation codes. Outputs the invite code that can be passed to other people. You need to perform your own checks on who's allowed to generate invitations.

All codes generated on frontend can be used just once.

Simple example


Advanced example

{exp:invitations:generate email="" destination_group_id="8" credits_author="5" credits_user="1" expire_in="10 days"}

Parameters (all optional):

Display invitations

This tags allows you display all invitations ever generated, or invitations that still can be used, or invitations by currently logged in user.

{exp:invitations:display mode="all" paginate="both" limit="10"}
<p>{count}. <strong>{code}</strong>
{if valid}
Can be used {use_left} times
{if not_valid}
Can not be used anymore
{if used}
Used by:
{users backspace="1"}
<a href="{path=member/profile/{user_id}}">{user_screen_name}</a>,

Tag parameters(all optional):

Conditional variables:

Single variables:

Variable pairs:

{users backspace="X"}{/users} — display list of members who used this code.

{paginate}{/paginate} — used to format and display pagination links (if you have limit parameter set and there's more than one page)

Applying invitation by existing user

You can also let your existing users apply invitation (consider is as promo code) to be authomatically moved to destination group.

{exp:invitations:apply return="SAME_PAGE"}
<p>Got promo code? Apply it here:</p> <p><input name="invitation" value="" /></p>
<p><input type="submit" value="Apply" /></p>

Tag parameters:

Form fields:


It's possible to list referrals for your site member(s), i.e. people who registered using invitation code generated by that person.

<p>My referrals</p> {exp:invitations:referrals}
<p><a href="{path=member/profile/{member_id}}">{screen_name}</a>,</p>

Tag parameters:

Single variables:


You can also display who has referred current (or any) user to the site (i.e. who generated the code he used)

<p>I've been referred by <a href="{path=member/profile/{member_id}}">{screen_name}</a></p>
{if no_results}<p>I've found this place myself</p>{/if}

Tag parameters:

Single variables:

Top of page