misaf / vendra-user
Comprehensive user management module with profiles, authentication, media handling and multi-tenant support
Requires
- php: ^8.4
- laravel/pennant: ^1.24
- misaf/filament-jalali: ^5.1.4
- misaf/laravel-email-validation: ^1.0
- misaf/vendra-multimedia: v1.12.3
- misaf/vendra-permission: v1.12.3
- misaf/vendra-support: v1.12.3
- spatie/laravel-package-tools: ^1.93.1
- staudenmeir/belongs-to-through: ^2.18
Requires (Dev)
None
Suggests
- misaf/vendra-tagger: Install this in the host application to assign typed tags to users.
Provides
None
Conflicts
None
Replaces
None
README
Tenant-aware user management for Vendra applications.
Features
- User model, authentication fields, and tenant-aware storage
- Filament user administration on configured panels
- Role and permission integration through Spatie Permission
- User creation, admin assignment, and permission seeding commands
- Optional tags resolved through the shared Support capability contract
- Domain actions for tenant administrator membership and credential/account changes
Requirements
- PHP 8.4+
- Laravel 13
- Filament 5
misaf/vendra-multimediamisaf/vendra-supportspatie/laravel-permission
Optional:
misaf/vendra-tagger— enables assigninguser-typed tags throughmisaf/vendra-support
Installation
composer require misaf/vendra-user php artisan vendor:publish --tag=vendra-user-migrations php artisan migrate
Optionally publish configuration and translations:
php artisan vendor:publish --tag=vendra-user-config php artisan vendor:publish --tag=vendra-user-translations
The service provider and Filament plugin are auto-registered. When an available
tenant resolver is bound, users are scoped and stamped automatically. If the
provider is installed after migrations have run, use
php artisan vendra-tenant:enable {tenant}.
Create users, assign the configured admin role, or seed module data with:
php artisan vendra-user:create php artisan vendra-user:assign-admin php artisan vendra-user:seed
Administrator operations
Use AddTenantAdministratorAction, PromoteTenantAdministratorAction,
DemoteTenantAdministratorAction, RemoveTenantAdministratorAction, and
SetUserAccountEnabledAction for tenant membership changes. These actions lock
the tenant membership boundary and prevent the final enabled administrator from
being removed, demoted, or disabled. UpdateUserEmailAction and
UpdateUserPasswordAction provide normalized/validated credential changes,
framework hashing, and remember-token rotation without exposing stored hashes.
Forms in any panel validate usernames and emails through Support\UserRules.
UserRules::email() is the strict email rule, and UserRules::unique() checks
a value within one tenant, or among platform users when the tenant is null.
Soft-deleted users release their username and email, matching the
users_active_username_unique and users_active_email_unique indexes.
Optional tags
When Tagger is installed, the user form and table expose tags automatically. User imports neither Vendra Tagger nor Spatie Tags; the integration is resolved through Support.
Create tags with the reserved user type before assigning them:
use Misaf\VendraTagger\Models\Tagger; Tagger::findOrCreate('VIP', type: 'user', locale: 'en');
Demo seeders use bundled JSON fixtures in production and when their declared factory classes are unavailable. Local monorepo development continues to use factories when they are autoloadable.
Testing
Run the package checks from the project root:
php artisan test --compact --testsuite=vendra-user
composer stan
License
MIT. See LICENSE.