A user management and authentication package for the Drago Project. Provides secure and type-consistent access to user data, authentication, tokens, and access protection.
- PHP >= 8.3
- Nette Framework
- Drago Project core packages
- User identity management via User and UserIdentity
- Authentication and token management via UserRepository
- Centralized access protection via the UserRequireLogged trait
- Type-safe exceptions and interfaces (UserIdentityException, UserToken)
- UsersEntity data entity for working with users in the database
- Easy integration with Nette DI
composer require drago-ex/project-user#[Inject]
public App\Core\User\UserAccess $userAccess;protected function beforeRender(): void
{
parent::beforeRender();
$this->template->userAccess = $this->userAccess;
}{varType App\Core\User\UserAccess $userAccess}
{block content}
<p>{$userAccess->getUserIdentity()->username}</p>
{/block}final class SecurePresenter extends Presenter
{
use App\Core\User\UserRequireLogged;
}