PHPackages                             tourze/user-id-bundle - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Authentication &amp; Authorization](/categories/authentication)
4. /
5. tourze/user-id-bundle

ActiveSymfony-bundle[Authentication &amp; Authorization](/categories/authentication)

tourze/user-id-bundle
=====================

用户身份管理和认证模块

1.0.0(6mo ago)04.3k12MITPHPCI passing

Since Apr 17Pushed 5mo ago1 watchersCompare

[ Source](https://github.com/tourze/user-id-bundle)[ Packagist](https://packagist.org/packages/tourze/user-id-bundle)[ RSS](/packages/tourze-user-id-bundle/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (7)Dependencies (18)Versions (11)Used By (12)

UserID Bundle
=============

[](#userid-bundle)

[English](README.md) | [中文](README.zh-CN.md)

[![Latest Version](https://camo.githubusercontent.com/afd82be6f24f6108ded04e30eff7da01613b62c0d3e55d3b831962514cf82be8/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f746f75727a652f757365722d69642d62756e646c652e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/tourze/user-id-bundle)[![License: MIT](https://camo.githubusercontent.com/7013272bd27ece47364536a221edb554cd69683b68a46fc0ee96881174c4214c/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d626c75652e737667)](LICENSE)[![PHP Version](https://camo.githubusercontent.com/c4f2a326bb2f96fd086ea1b165854ebfa32796e57fe602f5911d0f3eebcfc060/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f7068702d762f746f75727a652f757365722d69642d62756e646c652e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/tourze/user-id-bundle)[![Code Coverage](https://camo.githubusercontent.com/994d68acb2aadf1c3c7711ddcb3b30429246a6c05da9e601f62c3f932ac795a8/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f636f7665726167652d3130302532352d627269676874677265656e2e7376673f7374796c653d666c61742d737175617265)](#testing)

A Symfony bundle for managing user identities, supporting multiple identity types (such as email, phone number, etc.), integrated with Symfony Security, and providing a general-purpose identity lookup and management service.

Features
--------

[](#features)

- 🔐 Support for multiple identity types (email, phone number, etc.)
- 🛡️ Integration with Symfony Security
- 🔍 General-purpose identity lookup service
- 🔧 Flexible extension for custom identity types
- 📦 Symfony 6.4+ compatible
- 💾 Arrayable models for easy serialization

Installation
------------

[](#installation)

**Requirements:**

- PHP 8.1+
- Symfony 6.4+ components

**Install via Composer:**

```
composer require tourze/user-id-bundle
```

Quick Start
-----------

[](#quick-start)

### 1. Register the Bundle

[](#1-register-the-bundle)

Add the bundle to your `config/bundles.php`:

```
return [
    // ...
    Tourze\UserIDBundle\UserIDBundle::class => ['all' => true],
];
```

### 2. Basic Usage

[](#2-basic-usage)

```
