PHPackages                             ppeerit/think-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. [Authentication &amp; Authorization](/categories/authentication)
4. /
5. ppeerit/think-user

ActiveLibrary[Authentication &amp; Authorization](/categories/authentication)

ppeerit/think-user
==================

Library for tp5 user

v0.0.1(9y ago)130Apache-2.0PHPPHP &gt;=5.4.0

Since Nov 17Pushed 8y ago1 watchersCompare

[ Source](https://github.com/ppeerit/think-user)[ Packagist](https://packagist.org/packages/ppeerit/think-user)[ Docs](https://github.com/ppeerit/think-user)[ RSS](/packages/ppeerit-think-user/feed)WikiDiscussions master Synced 2mo ago

READMEChangelog (1)DependenciesVersions (2)Used By (0)

think-user
==========

[](#think-user)

[![GitHub issues](https://camo.githubusercontent.com/9b78ce5d9e3afab2f3489e85e7d4fc5a8d34e83b5fa7d703dbceb8c870821998/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6973737565732f707065657269742f7468696e6b2d757365722e737667)](https://github.com/ppeerit/think-user/issues)[![GitHub license](https://camo.githubusercontent.com/7013272bd27ece47364536a221edb554cd69683b68a46fc0ee96881174c4214c/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d626c75652e737667)](https://raw.githubusercontent.com/ppeerit/think-user/master/LICENSE)[![Downloads](https://camo.githubusercontent.com/3813981b117d0ac14ab611187cde808eddf46a535e42e261e721e7804ec2460a/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f646f776e6c6f6164732f707065657269742f7468696e6b2d757365722f6c61746573742f746f74616c2e737667)](https://packagist.org/packages/ppeerit/think-user)

ppeerit\\think-user 是基于thinkphp5的简单的用户相关扩展包

\##安装

```
composer require ppeerit\think-user
```

\##配置 扩展配置目录中新增配置文件user.php

```
return [
	'user_session_name' => 'member_auth', // 用户session名称
	'user_session_sign' => 'member_auth_sign', // 用户session签名名称
	'user_pk' => 'uid', // 用户主键
	'password_key' => 'fg5h4ertH45df', // 密码加密字符串，自定义
	'encrypt_level' => 2, //加密等级，1：简单加密，2：双重加密
];
```

\##使用 加载命名空间

```
use Ppeerit\User\User;
```

\##方法 判断用户是否登陆

```
// 登陆成功返回用户主键值，失败返回0
User::isLogin();
```

用户自动登录

```
// auth参数为写入session的数组，必须包含用户主键
User::autoLogin($auth);
```

用户密码加密

```
// pwd参数为需要加密的密码
User::encrypt($pwd);
```

\##更多方法完善中

###  Health Score

23

—

LowBetter than 27% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity9

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity48

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

Unknown

Total

1

Last Release

3466d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/bc9ac0baa4a9380596619d9c5d630cb6601f7d0d1b59b8e010179eaadfb154e7?d=identicon)[zewail](/maintainers/zewail)

---

Top Contributors

[![czewail](https://avatars.githubusercontent.com/u/14213748?v=4)](https://github.com/czewail "czewail (21 commits)")

---

Tags

user

### Embed Badge

![Health badge](/badges/ppeerit-think-user/health.svg)

```
[![Health](https://phpackages.com/badges/ppeerit-think-user/health.svg)](https://phpackages.com/packages/ppeerit-think-user)
```

###  Alternatives

[lab404/laravel-impersonate

Laravel Impersonate is a plugin that allows to you to authenticate as your users.

2.3k16.4M48](/packages/lab404-laravel-impersonate)[sonata-project/user-bundle

Symfony SonataUserBundle

3465.6M44](/packages/sonata-project-user-bundle)[2amigos/yii2-usuario

Highly customizable and extensible user management, authentication, and authorization Yii2 extension

298275.5k14](/packages/2amigos-yii2-usuario)[amnah/yii2-user

Yii 2 user authentication module

252225.7k3](/packages/amnah-yii2-user)[lab404/laravel-auth-checker

Laravel Auth Checker allows you to log users authentication, devices authenticated from and lock intrusions.

223164.9k2](/packages/lab404-laravel-auth-checker)[yajra/laravel-acl

Laravel ACL is a simple role, permission ACL for Laravel Framework.

112103.9k1](/packages/yajra-laravel-acl)

PHPackages © 2026

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