Pam
class Pam
账号操作
Traits
Properties
protected Resp | $error | error | from AppTrait |
protected Resp | $success | success | from AppTrait |
protected | $pam | from PamTrait |
Methods
bool
userSettingSet(int $account_id, string $key, array $values, array $available = [])
No description
from
UserSettingTrait
bool
getIsRegister()
No description
bool
captchaLogin(string $passport, string $captcha, string $guard)
验证验登录
bool
beCaptchaLogin(string $mobile, string $captcha)
后台验证码登录
void
setParentId(int $parent_id)
设置父级ID
bool
register(string $passport, string $password = '', string|array|int $role_name = PamRole::FE_USER)
用户注册
bool
loginCheck(string $passport, string $password, string $guard_name = PamAccount::GUARD_WEB)
密码登录
bool
bool
clearMobile(int $id)
清空后台登录用户的手机通行证
bool
void
bool
array
passportData(array|Request $credentials)
生成支持 passport 格式的数组
bool
rebind(string|numeric-string|int|float|PamAccount $old_passport, string $new_passport)
更换账号主体, 支持除非ID外的更换方式
bool
disable(int $id, string $to, string $reason)
后台用户禁用
bool
enable(int $id, string $reason = '')
后台用户启用
bool
autoEnable()
自动解禁
void
logout()
No description
bool
clearLog()
清除登录日志
bool
changePassword(string $old_password, string $password)
修改密码
bool
checkPwdStrength($type, $password)
No description
bool
Details
in
UserSettingTrait at line 20
array|mixed
userSettingGet(int $account_id, string $key)
根据 用户ID获取配置
in
UserSettingTrait at line 33
bool
userSettingSet(int $account_id, string $key, array $values, array $available = [])
No description
in
AppTrait at line 45
bool
setError(string|MessageBag $error)
设置错误
in
PamTrait at line 25
PamAccount
getPam()
No description
in
PamTrait at line 36
$this|PamTrait
setPam(PamAccount|Authenticatable|int $pam)
Set Pam Account.
in
PamTrait at line 52
bool
checkPam()
检查 pam 用户
in
PamTrait at line 66
bool
checkPermission(string $permission_key)
检测当前用户是否存在权限
at line 60
bool
getIsRegister()
No description
at line 73
bool
captchaLogin(string $passport, string $captcha, string $guard)
验证验登录
at line 125
bool
beCaptchaLogin(string $mobile, string $captcha)
后台验证码登录
at line 157
void
setParentId(int $parent_id)
设置父级ID
at line 170
bool
register(string $passport, string $password = '', string|array|int $role_name = PamRole::FE_USER)
用户注册
at line 319
bool
loginCheck(string $passport, string $password, string $guard_name = PamAccount::GUARD_WEB)
密码登录
at line 384
bool
setPassword(PamAccount $pam, string $password)
设置登录密码
at line 421
bool
clearMobile(int $id)
清空后台登录用户的手机通行证
at line 440
bool
setMobile(PamAccount $pam, string $mobile)
设置后台登录用户的手机通行证
at line 480
void
setNote(PamAccount $pam, string $note)
设置备注
at line 492
bool
setRoles(PamAccount|mixed $pam, array $roles)
设置角色
at line 507
array
passportData(array|Request $credentials)
生成支持 passport 格式的数组
at line 531
bool
rebind(string|numeric-string|int|float|PamAccount $old_passport, string $new_passport)
更换账号主体, 支持除非ID外的更换方式
at line 565
bool
disable(int $id, string $to, string $reason)
后台用户禁用
at line 616
bool
enable(int $id, string $reason = '')
后台用户启用
at line 637
bool
autoEnable()
自动解禁
at line 658
void
logout()
No description
at line 669
bool
clearLog()
清除登录日志
at line 688
bool
changePassword(string $old_password, string $password)
修改密码
at line 707
bool
checkPwdStrength($type, $password)
No description
at line 730
bool
checkIsEnable(PamAccount $pam)
验证用户权限