Skip to content

When a new user is created

Sends a notification when a new User is created. This trigger fires the first time a User is saved, so it covers public registrations, control-panel "New User" submissions, and any programmatic call to Craft::$app->getElements()->saveElement() on a brand-new User.

The trigger only fires once per User. Re-saving an existing User (profile updates, password changes, group reassignment) does not re-fire it.

User Group Filters

Choose which user groups should fire this notification. Only users belonging to one of the selected groups will trigger it, and a user in multiple selected groups still receives only a single notification.

Ungrouped Users are users who belong to no group at all.

Selection is required

Check at least one group (or Ungrouped), or the notification won't fire.

Hidden if no groups exist

If no user groups are set up, this filter is skipped and every valid user will receive the notification.

Field Conditions

Field conditions restrict the notification based on the element's content, using Craft's native conditions framework. Build a rule set against the element's attributes and field values, and the notification will be sent only when every rule matches.

Must match all conditions

The condition builder evaluates every rule with AND semantics, so each rule must pass for the notification to be sent.

Twig variables

The object variable (and its user alias) is the new User.

twig
A new user just signed up: {{ user.fullName }} ({{ user.email }}).

Caveats

Creation, not activation

This trigger fires the moment a User record is saved for the first time, regardless of activation status. If your site requires email verification, this notification will be sent before they click the verification link.

To send a message after the User has activated their account instead, use "When a user is activated".

Examples

Confirm the new sign-up

twig
Hi {{ user.firstName }},

Thanks for signing up! Watch your inbox for a verification email.

Alert administrators of a public registration

twig
A new user just signed up:

- Name: {{ user.fullName }}
- Email: {{ user.email }}
- Username: {{ user.username }}

Skip the welcome message for users in a specific group

twig
{% if user.isInGroup('contractors') %}
    {% skipMessage "Contractors do not receive the welcome email." %}
{% endif %}