[PR #127] [MERGED] register: fix username label and add uniqueness check #127

Closed
opened 2026-05-07 00:18:17 +02:00 by BreizhHardware · 0 comments

📋 Pull Request Information

Original PR: https://github.com/pelican-dev/plugins/pull/127
Author: @rxtted
Created: 5/1/2026
Status: Merged
Merged: 5/1/2026
Merged by: @Boy132

Base: mainHead: fix/register-username-label-and-unique


📝 Commits (2)

  • 0480686 fix username label and add uniqueness check
  • 6390c87 Update register/src/Filament/Pages/Auth/Register.php

📊 Changes

1 file changed (+3 additions, -1 deletions)

View changed files

📝 register/src/Filament/Pages/Auth/Register.php (+3 -1)

📄 Description

before:

the username override renames the parent's name input but keeps the parent's label, which resolves to
"name". the form rendered a field labeled "name" while binding to the username column users sign in with.

the override also dropped the parent's unique check, so duplicate-username submissions fell through to user creation and surfaced the database unique index violation as an unhandled error.

change:

added an explicit username label using the panel's existing translation key, and a unique validation rule scoped to the username column. mirrors how the parent handles the email field.

after:

the field renders with the label "Username". duplicate submissions show "The username has already been taken."

Summary by CodeRabbit

  • Bug Fixes
    • Registration username now enforces uniqueness to prevent duplicate accounts.
    • Username label is localized, showing the correct text for the user's language.
    • Validation and labeling improvements ensure clearer feedback on the registration form and reduce sign-up errors.

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/pelican-dev/plugins/pull/127 **Author:** [@rxtted](https://github.com/rxtted) **Created:** 5/1/2026 **Status:** ✅ Merged **Merged:** 5/1/2026 **Merged by:** [@Boy132](https://github.com/Boy132) **Base:** `main` ← **Head:** `fix/register-username-label-and-unique` --- ### 📝 Commits (2) - [`0480686`](https://github.com/pelican-dev/plugins/commit/048068623599a18c0fadeeded49b22d7b6678cd4) fix username label and add uniqueness check - [`6390c87`](https://github.com/pelican-dev/plugins/commit/6390c87be85decf17bff8cc1ca50a2c071f23ac0) Update register/src/Filament/Pages/Auth/Register.php ### 📊 Changes **1 file changed** (+3 additions, -1 deletions) <details> <summary>View changed files</summary> 📝 `register/src/Filament/Pages/Auth/Register.php` (+3 -1) </details> ### 📄 Description before: the username override renames the parent's name input but keeps the parent's label, which resolves to "name". the form rendered a field labeled "name" while binding to the username column users sign in with. the override also dropped the parent's unique check, so duplicate-username submissions fell through to user creation and surfaced the database unique index violation as an unhandled error. change: added an explicit username label using the panel's existing translation key, and a unique validation rule scoped to the username column. mirrors how the parent handles the email field. after: the field renders with the label "Username". duplicate submissions show "The username has already been taken." <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **Bug Fixes** * Registration username now enforces uniqueness to prevent duplicate accounts. * Username label is localized, showing the correct text for the user's language. * Validation and labeling improvements ensure clearer feedback on the registration form and reduce sign-up errors. <!-- end of auto-generated comment: release notes by coderabbit.ai --> --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
BreizhHardware 2026-05-07 00:18:17 +02:00
Sign in to join this conversation.
No labels
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/plugins#127
No description provided.