PHPackages                             bymayo/porter - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. bymayo/porter

ActiveCraft-plugin[Utility &amp; Helpers](/categories/utility)

bymayo/porter
=============

A toolkit with lots of helpers for users and accounts

5.2.2(2mo ago)27902[4 issues](https://github.com/bymayo/craft-porter/issues)MITPHPCI passing

Since Jun 21Pushed 2mo ago1 watchersCompare

[ Source](https://github.com/bymayo/craft-porter)[ Packagist](https://packagist.org/packages/bymayo/porter)[ RSS](/packages/bymayo-porter/feed)WikiDiscussions craft-5 Synced today

READMEChangelog (10)Dependencies (8)Versions (21)Used By (0)

[![](https://github.com/bymayo/craft-porter/raw/craft-5/resources/icon.png)](https://github.com/bymayo/craft-porter/blob/craft-5/resources/icon.png)

Porter for Craft CMS 5
======================

[](#porter-for-craft-cms-5)

Porter is a Craft CMS plugin that is the missing toolbox for all things users.

[![](https://raw.githubusercontent.com/bymayo/craft-porter/craft-5/resources/screenshot.png)](https://raw.githubusercontent.com/bymayo/craft-porter/craft-5/resources/screenshot.png)

Features
--------

[](#features)

- [Delete Account](#delete-account)
    - Front-end form for users to delete their own account
    - Customisable confirmation keyword (e.g. `DELETE`) or user field
- [Deactivate Account](#deactivate-account)
    - Front-end form for users to deactivate their own account
- [Inactive Account Cleanup](#inactive-account-cleanup)
    - Warn users by email after a configurable period of inactivity
    - Auto-deactivate accounts that don't return after a longer threshold
    - Admins and users with control panel access are always skipped
- [Magic Link](#magic-link)
    - Sign in via a link emailed to the user's inbox
    - Front end and/or control panel login, with configurable expiry
- [Block Burner / Disposable Emails](#block-burner--disposable-emails)
    - 22,000+ disposable email domains blocked
    - Domain validity, syntax and MX record checks
- Password Policy
    - Configurable min/max length
    - Lower case, upper case, numeric, and symbol requirements
- [Email Notifications](#email-notifications)
    - Transactional emails for key account events (sign in, password change, suspension, deletion, etc.)
    - Each email can be toggled on/off in the plugin settings
    - All email content is editable under `Settings > System Messages`

Install
-------

[](#install)

- Install with Composer: `composer require bymayo/porter`
- Enable the plugin under `Settings > Plugins`
- Configure under `Settings > Porter`

You can also install via the Plugin Store by searching for `Porter`.

Requirements
------------

[](#requirements)

- Craft CMS 5.x
- PHP 8.2
- MySQL (no PostgreSQL support)

How to use
----------

[](#how-to-use)

The Delete Account, Deactivate Account and Magic Link forms all work the same way: drop the Twig helper into a template, optionally pass a properties hash to override the defaults, or copy the full form template into your project for total control.

### Delete Account

[](#delete-account)

Let users delete their own account from the front end. Enable under `Settings > Porter > Account` and pick a confirmation keyword or user field.

```
{{ craft.porter.deleteAccountForm() }}
```

Classes are prefixed with `porter__` by default. Override any property:

```
{{ craft.porter.deleteAccountForm({
    buttonClass: 'bg-black text-white hover:bg-white hover:text-black',
    buttonText: 'Delete Account',
}) }}
```

PropertyDefaultDescription`redirect`Plugin redirect settingWhere the user goes after deletion`confirmationClass``porter__confirmation`Class for the confirmation field`alertClass``porter__alert`Class for the success/error flash`fieldClass``porter__field`Class for the input`fieldContainerClass``porter__field-container`Class for the field wrapper`fieldLabelClass``porter__field-label`Class for the input label`buttonClass``porter__button`Class for the submit button`buttonText``Delete Account`Submit button textFor full markup control, copy `bymayo/porter/src/templates/components/deleteAccountForm.twig` into your project. From Twig you can read the defaults via `craft.porter.deleteAccountFormProperties()`:

```
{% set formProperties = craft.porter.deleteAccountFormProperties() %}

{{ formProperties.buttonText }}
```

> ⚠️ Users need the "Delete Users" permission on themselves or their user group.

> ⚠️ Admins cannot delete their own account.

### Deactivate Account

[](#deactivate-account)

Let users deactivate their own account from the front end. Enable under `Settings > Porter > Account`.

```
{{ craft.porter.deactivateAccountForm() }}
```

```
{{ craft.porter.deactivateAccountForm({
    buttonClass: 'bg-black text-white hover:bg-white hover:text-black',
    buttonText: 'Deactivate Account',
}) }}
```

PropertyDefaultDescription`redirect`Plugin redirect settingWhere the user goes after deactivation`alertClass``porter__alert`Class for the success/error flash`buttonClass``porter__button`Class for the submit button`buttonText``Deactivate Account`Submit button textFor full markup control, copy `bymayo/porter/src/templates/components/deactivateAccountForm.twig`. Defaults are available via `craft.porter.deactivateAccountFormProperties()`.

> ⚠️ Admins cannot deactivate their own account.

### Magic Link

[](#magic-link)

Sign in via a link emailed to the user's inbox. Enable under `Settings > Porter > Login`.

```
{{ craft.porter.magicLinkForm() }}
```

```
{{ craft.porter.magicLinkForm({
    buttonClass: 'bg-black text-white hover:bg-white hover:text-black',
    buttonText: 'Send Magic Link',
}) }}
```

PropertyDefaultDescription`redirect`Plugin redirect settingWhere the user goes after requesting a link`alertClass``porter__alert`Class for the success/error flash`fieldClass``porter__field`Class for the email input`fieldContainerClass``porter__field-container`Class for the field wrapper`fieldLabelClass``porter__field-label`Class for the input label`buttonClass``porter__button`Class for the submit button`buttonText``Send Magic Link`Submit button textFor full markup control, copy `bymayo/porter/src/templates/components/magicLinkForm.twig`. Defaults are available via `craft.porter.magicLinkFormProperties()`.

> ⚠️ Admins cannot use magic links.

### Inactive Account Cleanup

[](#inactive-account-cleanup)

Warn users who haven't signed in for a while, then deactivate them if they don't return. Enable under `Settings > Porter > Account` and set the reminder and deactivate thresholds.

Cleanup runs via a console command, so schedule it with cron:

```
0 3 * * * cd /path/to/site && php craft porter/users/cleanup-inactive

```

Each run sends warning emails to users that have crossed the reminder threshold (once per inactive period — signing back in resets it) and deactivates accounts past the deactivate threshold. Deactivated users get the `Account Deactivated` notification if it's enabled.

> ⚠️ Admins and any user with control panel access are always skipped.

> ⚠️ Users with no `lastLoginDate` aren't touched. Reactivating a previously deactivated user clears their `lastLoginDate` automatically, so they get a fresh inactivity clock from their next sign in.

### Block Burner / Disposable Emails

[](#block-burner--disposable-emails)

Block disposable and invalid emails at sign up. Enable under `Settings > Porter > Email & Password` and add a free API key from .

### Email Notifications

[](#email-notifications)

Send transactional emails on key user events. Toggle each one under `Settings > Porter > Notifications`. Email content (heading, subject, body) is editable under `Settings > System Messages`.

EmailSent whenWelcomeA user's account is activated.New Device Login DetectedA user signs in from a new IP or device.Password ChangedA user's password is changed.Email Address ChangedA user's email is changed (sent to the previous address).Account SuspendedA user's account is suspended.Account RestoredA suspended account is restored.Account DeactivatedA user's account is deactivated.Account DeletedA user's account is deleted.Failed Login AttemptsConsecutive failed sign in attempts cross the configured threshold.Inactive Account ReminderA user hasn't signed in for a while, before their account is deactivated.#### Porter's HTML email template

[](#porters-html-email-template)

Porter ships with a clean, responsive HTML email layout. Craft expects the template inside your project's `templates/` folder, so copy it across once:

1. Copy the file:

    ```
    mkdir -p templates/_emails
    cp vendor/bymayo/porter/src/templates/email/_layout.twig templates/_emails/layout.twig
    ```
2. In the control panel, go to `Settings → Email` and set **HTML Email Template** to `_emails/layout`.
3. Send a test from `Settings → Email → Test` to verify it renders.

Tweak the copy (logo, colours, footer) to match your brand — Porter won't overwrite it on plugin updates.

> ⚠️ **New Device Login Detected — behind a proxy?**
>
> If your site sits behind a reverse proxy, load balancer or CDN, set the following in `config/general.php` so Craft picks up the real client IP:
>
> ```
> 'trustedHosts' => ['any'], // or restrict to your proxy's CIDR ranges
> 'secureHeaders' => ['X-Forwarded-For', 'X-Forwarded-Host', 'X-Forwarded-Proto'],
> ```

Support
-------

[](#support)

If you have any issues (Surely not!) then I'll aim to reply to these as soon as possible. If it's a site-breaking-oh-no-what-has-happened moment, then hit me up on the Craft CMS Discord - @bymayo

###  Health Score

41

—

FairBetter than 87% of packages

Maintenance67

Regular maintenance activity

Popularity18

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity57

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~83 days

Recently: every ~17 days

Total

18

Last Release

64d ago

Major Versions

1.0.4 → 5.0.02024-05-30

1.0.5 → 5.0.22024-07-11

1.0.6 → 5.0.32024-07-23

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/522877?v=4)[Jason Mayo](/maintainers/bymayo)[@bymayo](https://github.com/bymayo)

---

Top Contributors

[![bymayo](https://avatars.githubusercontent.com/u/522877?v=4)](https://github.com/bymayo "bymayo (52 commits)")

---

Tags

craft-plugincraft4craftcmscmsCraftcraftcmscraft-pluginporter

### Embed Badge

![Health badge](/badges/bymayo-porter/health.svg)

```
[![Health](https://phpackages.com/badges/bymayo-porter/health.svg)](https://phpackages.com/packages/bymayo-porter)
```

###  Alternatives

[verbb/formie

The most user-friendly forms plugin for Craft.

102393.6k70](/packages/verbb-formie)[verbb/comments

Add comments to your site.

13753.9k](/packages/verbb-comments)[verbb/navigation

Create navigation menus for your site.

92705.0k18](/packages/verbb-navigation)[verbb/vizy

A flexible visual editor field for Craft.

4250.4k](/packages/verbb-vizy)[verbb/hyper

A user-friendly links field for Craft.

24147.8k12](/packages/verbb-hyper)[verbb/workflow

Enforce multi-step review processes for creating entries.

138124.2k1](/packages/verbb-workflow)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
