承接 drago-ex/project-user 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

drago-ex/project-user

最新稳定版本:v1.0.1

Composer 安装命令:

composer require drago-ex/project-user

包简介

A small helper package for working with the authenticated user in Drago project.

README 文档

README

A small helper package for working with the authenticated user in Drago project. Provides type-safe access to identity data and a simple, extensible user identity object.

License: MIT PHP version Coding Style

Requirements

  • PHP >= 8.3
  • Nette Framework
  • Drago Project core packages

Installation

composer require drago-ex/project-user

Examples

Injecting the user service:

use App\Core\User\UserAccess;
use Nette\DI\Attributes\Inject;

final class SomePresenter extends Presenter
{
	#[Inject]
	public UserAccess $userAccess;

	protected function beforeRender(): void
	{
		parent::beforeRender();
		$this->template->userAccess = $this->userAccess;
	}
}

Identity data in latte

{varType App\Core\User\UserAccess $userAccess}
{block content}
	<p>{$userAccess->getUserIdentity()->username}</p>
{/block}

User identity object

For common identity fields, use the typed UserIdentity object:

$identity = $userAccess->getUserIdentity();

echo $identity->username;
echo $identity->email;

The UserIdentity class is intentionally simple and can be extended with additional attributes (e.g. id, roles, permissions) as needed.

UserIdentityException is thrown when identity data is missing or invalid.

Notes

  • This package does not handle authentication or authorization.
  • Focused only on safe and convenient access to user identity data.

统计信息

  • 总下载量: 73
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 0
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 0
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2025-12-25

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固