Skip to content

When a user is restored

Sends a notification when a User account has been restored from the trash.

This only covers users that were soft-deleted and then restored from the control panel Trashed view or via restoreElement(). Users that were hard-deleted cannot be restored, and thus never fire this trigger.

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 restored User.

twig
{{ user.fullName }}'s account was just restored.

Examples

Welcome the user back

twig
Hi {{ user.firstName }},

Your account was just restored. You can sign in again at {{ siteUrl }}.

Alert admins of an account restore

twig
A user account was just restored.

- Name: {{ user.fullName }}
- Email: {{ user.email }}
- Restored by: {{ currentUser.fullName ?? 'system' }}