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: ^3.0
- drago-ex/project-auth: ^2.0
- drago-ex/translator: ^4.0.1
Requires (Dev)
- drago-ex/project-tools: ^1.0
- 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
The account page of the signed-in user in Drago Project: changing the name, the email address and the password.
Requirements
- PHP >= 8.3, < 9
- Drago Project
- Project Auth
Installation
composer require drago-ex/project-account
Project Tools copies the files of the package into the project,
where you adapt them. The page has its own entry point assets/account.js; its npm dependencies (theme switcher,
Font Awesome) are installed by npm install of the project.
Usage
{link :Account:}
The Account presenter is outside the front and backend modules, so both can link it. It has two forms:
the profile (name and email) and the password change.
- Changing the email address requires the current password; the new address applies after it is confirmed by a link, and the previous address gets a notice.
- Wrong current passwords are limited to 5 per user in 15 minutes.
- New passwords follow the rules of Project Auth; changing the password signs out all other sessions.
Permissions
The rules are in Account/acl.neon: the resource Account, for signed-in users.
The same file describes the privileges (permissionLabels) for the permissions page of Project Permission.