username_suggester
The Username suggester module improves Drupal's user registration by automatically providing suggestions in the "username" input in real time through utilizing the new Drupal HTMX API.
It reduces friction for new users while keeping the username field visible and editable.
Features
- Real-time username suggestions based on email input using Drupal's HTMX API
- Configurable generation patterns with full token support
- Customizable trigger events (blur, change, keyup with delays, etc.)
- Custom Tokens for flexible username generation (mail, mail_local, mail_domain)
Configuration
Configure the module at admin/config/people/username_suggester:
- Generation Pattern: Define how usernames are generated using tokens (default:
[username_suggester:mail_local]). - Trigger Event: Specify when suggestions are generated (default:
blur).
Additional Requirements
- No dependencies beyond Drupal core.
- Requires JavaScript enabled in the browser.
Recommended modules
- Token: Provides a token browser UI for easier pattern configuration (optional but recommended).
Similar projects
- Username suggestions: Provides username suggestions as a list via AJAX
- Email Registration: Hides username field, generates server‑side.
- Auto Username: Server‑side generation based on patterns.
- Realname Registration: Generates usernames from real names.
Supporting this module
Support DROWL's ♥ FOSS work on this module on OpenCollective!
Drupal and this module are FOSS. However, it takes dedicated people to develop and maintain. And they need YOU to give back!
We're committed to building and maintaining Drupal modules that benefit the entire community.
Supporting us on OpenCollective helps us continue to improve, innovate and contribute to Drupal's future. Every pledge makes a difference!
If this module has helped you, we would be very grateful for your donation to support its further development and maintenance.
Support our FOSS development ♥️
You can also speed up the development of features or bugfixes you'd love to see, by sponsoring and giving back!
Let's make Drupal even better, together!
Development proudly sponsored by German Drupal Friends & Companies:
webks: websolutions kept simple (https://www.webks.de)
and
DROWL: Drupalbasierte Lösungen aus Ostwestfalen-Lippe (OWL), Germany (https://www.drowl.de)