louisstanley / ci4-shield-username-suggest
A CodeIgniter 4 Shield extension to suggest usernames based on email addresses.
dev-main
2025-05-04 20:09 UTC
Requires
- codeigniter4/framework: ^4.3
- codeigniter4/shield: ^1.0
Requires (Dev)
- codeigniter4/devkit: ^1.3
This package is auto-updated.
Last update: 2025-06-04 20:17:00 UTC
README
A CodeIgniter 4 extension that adds username suggestions to Shield's registration process.
Requirements
- CodeIgniter 4.3+
- CodeIgniter Shield
- PHP 7.4+
Installation
composer require louisstanley/ci4-shield-username-suggest
Quick Setup
-
Copy the Register View Copy the provided
register.php
view from the package into your CodeIgniter 4 app's views directory. For example:cp vendor/louisstanley/ci4-shield-username-suggest/src/Views/register.php app/Views/auth/register.php
-
Set the View in Shield Config In your
app/Config/Auth.php
, set the custom register view path:public $views = [ 'register' => 'auth/register', ];
This ensures that Shield uses the modified view with username suggestions during registration.
Features
- Generates usernames based on email addresses
- Shows available username options to users
- Allows one-click selection of suggested usernames