Forums Feature Requests Thread

[Enhancement] Cross-cutting infra: Orphaned email template: account-lockout.php (never sent)

Patrick Bass · Jun 6 · 12 · 1 Locked
[Normal Priority] [Feature Enhancement] [Deployed to Production]
🚀 OP Jun 6, 2026 8:05pm

Area: Cross-cutting infra (audit p14) · Surface: platform/templates/email/account-lockout.php · Dimension: deadcode · Severity: minor

templates/email/account-lockout.php exists but is never used as a MailService template name. Account-lockout logic operates purely on the account_lockouts table (delete-on-unlock); no notification email is ever sent with this template.

Evidence

Zero inbound references. `$ grep -rn "account-lockout" src/ bin/ public/ templates/ --include=*.php | grep -v account_lockouts | grep -v 'templates/email/account-lockout.php:'` → (empty, exit 1). All other 'lockout' hits are the unrelated `account_lockouts` DB table (User.php:633, AdminUserActionController.php:469, etc.). No MailService::send(..., 'account-lockout', ...) anywhere.

Suggested fix. Either wire the template into the lockout path (send a lockout-notification email when an account is locked) if that notification is desired, or delete templates/email/account-lockout.php as dead code.

Filed by the automated tenant-app audit and adversarially evidence-verified. Status: verified. Open — not yet actioned.


Patrick Bass
@mobieus

🚀 Jun 7, 2026 10:24am

Resolved and deployed. Commit ca230723ea.

templates/email/account-lockout.php deleted — account-lockout logic operates on the account_lockouts table only; no notification email is ever sent.

Closed as: shipped.


Patrick Bass
@mobieus

Log in or register to reply to this thread.