PHPackages                             qingbing/yii2-backend-user - 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. [Admin Panels](/categories/admin)
4. /
5. qingbing/yii2-backend-user

ActiveLibrary[Admin Panels](/categories/admin)

qingbing/yii2-backend-user
==========================

yii2实现组件:后管用户管理

1.0.2(3y ago)02MITPHPPHP ^7.1.0

Since Dec 2Pushed 3y ago1 watchersCompare

[ Source](https://github.com/qingbing/yii2-backend-user)[ Packagist](https://packagist.org/packages/qingbing/yii2-backend-user)[ Docs](http://www.phpcorner.net)[ RSS](/packages/qingbing-yii2-backend-user/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependencies (8)Versions (3)Used By (0)

yii2-task
=========

[](#yii2-task)

yii2实现组件:后管用户管理

- 引用组件(配置的使用参考组件)
    - qingbing/yii2-permission

使用
==

[](#使用)

一、配置
----

[](#一配置)

### 1.1 配置控制器 web.php

[](#11-配置控制器-webphp)

```
'controllerMap' => [
    // 后管用户系统
    'login'    => \YiiBackendUser\controllers\LoginController::class,
    'personal' => \YiiBackendUser\controllers\PersonalController::class,
]
```

### 1.2 配置用户登录 web.php

[](#12-配置用户登录-webphp)

```
'components' => [
    'user'           => [
        'class'           => \YiiBackendUser\components\User::class,
        'identityClass'   => \YiiBackendUser\models\User::class,
        'enableAutoLogin' => true,
        'identityCookie'  => ['name' => '_identity-' . define_var('CONF_APP_ID', 'portal'), 'httpOnly' => true],
        'multiUserLogin'      => define_var('COM_USER_MULTI_USER_LOGIN', false), // 允许用户多客户端登录
        'multiAccountLogin'      => define_var('COM_USER_MULTI_ACCOUNT_LOGIN', false), // 允许账户多客户端登录
        // 允许登录的账户类型
        'loginTypes'      => [
            \YiiBackendUser\models\UserAccount::TYPE_EMAIL,
            \YiiBackendUser\models\UserAccount::TYPE_USERNAME,
            \YiiBackendUser\models\UserAccount::TYPE_MOBILE,
            \YiiBackendUser\models\UserAccount::TYPE_NAME,
        ],
    ],
],
```

### 1.3 配置后管页面权限控制 web.php

[](#13-配置后管页面权限控制-webphp)

```
'bootstrap'     => [
    'bootPermission',
],
'components' => [
    'bootPermission' => [
        'class'      => \YiiBackendUser\boots\PermissionBootstrap::class,
        'openCheck'  => define_var('COM_BOOT_PERMISSION_OPEN_CHECK', true), // 是否开启权限检查
        'pubPaths'   => [
            'portal/inner/*', // inner模块接口属于内部服务调用接口，模块内部
            'portal/login/*', // 登录及检查
            'portal/test/*',
            'portal/login/*',
            'portal/public/*'
        ],
        'whiteIps'   => [
            '192.168.1.1',
        ],
        'whitePaths' => [
        ],
    ],
],
```

### 1.4 组件常量配置 define-local.php

[](#14-组件常量配置-define-localphp)

```
// user 组件配置
defined('COM_USER_MULTI_USER_LOGIN') or define('COM_USER_MULTI_USER_LOGIN', true); // 允许用户多终端登录
defined('COM_USER_MULTI_ACCOUNT_LOGIN') or define('COM_USER_MULTI_ACCOUNT_LOGIN', true); // 允许账号多终端登录

// bootPermission 组件
defined('COM_BOOT_PERMISSION_OPEN_CHECK') or define('COM_BOOT_PERMISSION_OPEN_CHECK', true); // 是否开启权限检查
```

二、对外 action
-----------

[](#二对外-action)

- \\YiiBackendUser\\actions\\AssignUserRole::class(为用户分配角色)
- \\YiiBackendUser\\actions\\UserMenu::class(登录用户拥有的菜单权限树)
- \\YiiBackendUser\\actions\\UserPermission::class(登录用户拥有的权限)

###  Health Score

20

—

LowBetter than 14% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity2

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity46

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~181 days

Total

2

Last Release

1441d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/9379d2ee4885074de75faa3fa12970614186826f762df3c4aa0905dc1ff3b513?d=identicon)[qingbing](/maintainers/qingbing)

---

Top Contributors

[![qingbing](https://avatars.githubusercontent.com/u/33932784?v=4)](https://github.com/qingbing "qingbing (19 commits)")

---

Tags

phpfeatureyii2yiicomponentbackend-useryii2-backend-user

### Embed Badge

![Health badge](/badges/qingbing-yii2-backend-user/health.svg)

```
[![Health](https://phpackages.com/badges/qingbing-yii2-backend-user/health.svg)](https://phpackages.com/packages/qingbing-yii2-backend-user)
```

###  Alternatives

[luyadev/luya-module-admin

Administration core module for all LUYA admin modules

48179.0k24](/packages/luyadev-luya-module-admin)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
