drago-ex / project-account
Account management for Drago Project.
Package info
github.com/drago-ex/project-account
Type:drago-tools-resource
pkg:composer/drago-ex/project-account
Requires
- php: >=8.3 <9
- drago-ex/component: ^2.0
- drago-ex/project-auth: ^2.6
Requires (Dev)
- drago-ex/project-tools: ^1.1
- nette/tester: ^2.5
- phpstan/phpstan-nette: ^2.0
Suggests
- drago-ex/permission: Enables generation of the frontend permission provider.
Provides
None
Conflicts
None
Replaces
None
README
Account management for Drago Project.
Requirements
- PHP >= 8.3, < 9
- Nette Framework
- Composer
- Bootstrap
- Naja
- Node.js
- Drago Project core packages
Installation
composer require drago-ex/project-account
npm Installation
The account management UI requires the theme switcher for proper functionality:
npm install theme-switcher-compostrap
Usage
The package adds an Account presenter for managing the current user account.
It is intentionally outside the frontend and backend modules, so the same account
screen can be linked from both parts of the application.
The presenter uses drago-ex/project-auth services for the current user,
repository access and password hashing.
The account screen provides two forms:
- profile information update
- password change with current password verification
Permission provider
With drago-ex/permission, the access rules from permission.php
are generated into the project by:
php vendor/bin/create-permission --packages
Security
- Changing the email address requires the current password.
- Current password attempts are limited to 5 failures per user in 15 minutes.
- New passwords follow the rules of
drago-ex/project-auth(at least 12 characters). - Changing the password signs out all other sessions.
- A new email address applies after it is confirmed by a link; the previous address gets a notice.