Download the PHP package hahadu/think-userlogin without Composer
On this page you can find all versions of the php package hahadu/think-userlogin. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Please rate this library. Is it a good library?
Informations about the package think-userlogin
think-userlogin
thinkphp用户登录模块
- 用户登录
- 用户注册
- 验证邮箱注册
- 验证用户登录
- 手机短信注册
- 登录鉴权方式:session/cookie 或JWT 方式鉴权
- 支持登陆后跳转到登陆前请求页面
安装:
默认安装依赖项 :
- thinkphp验证码模块 topthink/think-captcha
- 发送验证邮件 phpmailer/phpmailer
- 发送验证短信 hahadu/sms
- 返码状态 hahadu/think-jump-class
创建用户数据表(可选)
1.配置config/console.php
2.命令行指令说明
- ModelName 用户表的名称 默认为users 如果在数据库配置文件中设置了表前缀则会自动加入表前缀
- --username 用户名,默认为admin
-
--password 用户密码 默认随机生成
- 以上指令会创建一个名为user的数据表,并创建一条用户名为admin 密码为123456的用户数据
- 如果用户存在则更新用户密码
项目做了用户名、密码、验证码的基本验证和登录成功后的session创建
使用:
- 在应用创建一个登录控制器
- 该控制器继承Hahadu\ThinkUserLogin\controller\BaseLoginController控制器
配置
用户表配置
- 在config/login.php配置登录信息
页面跳转配置
邮箱验证注册
短信验证注册
短信使用 hahadu/sms 模块 近期短信模块重大升级,升级本模块后请务必修改短信模块的配置项!详情参考: https://github.com/hahadu/sms
修改密码
获取邮箱或者短信验证码也是非常简单
如需自己定义验证码,只需按照tp6的验证码文档操作即可
关于返回状态码:
- 100003 登录成功
- 100004 退出登录成功
- 420103 登录失败
- 420104 退出登录失败
- 420107 邮箱验证失败
- 420109 验证码必填
- 420108 用户名必填
- 420110 密码必填
-
420111 重复密码错误
交流qq群 [(点击链接加入群聊【thinkphp6开发交流群】:839695142]https://jq.qq.com/?_wv=1027&k=FxgUKLhJ)
All versions of think-userlogin with dependencies
PHP Build Version
Package Version
Requires
php Version
>=7.1
topthink/think-captcha Version ^3.0
hahadu/helper-function Version >=0.6.0
hahadu/think-jump-class Version >=3.1
lcobucci/jwt Version ^3.3
phpmailer/phpmailer Version ^6.1
hahadu/sms Version ^1.0
topthink/think-captcha Version ^3.0
hahadu/helper-function Version >=0.6.0
hahadu/think-jump-class Version >=3.1
lcobucci/jwt Version ^3.3
phpmailer/phpmailer Version ^6.1
hahadu/sms Version ^1.0
The package hahadu/think-userlogin contains the following files
Loading the files please wait ....