[fix] Helper args invalid

This commit is contained in:
Lkeme 2022-10-25 15:42:24 +08:00
parent 851568fd4c
commit e32e36d8bc
2 changed files with 3 additions and 3 deletions

View File

@ -27,7 +27,7 @@
### Remarks ### Remarks
- - 补丁需要触发一次登录或者刷新才会生效,删除`profile/{user}/cache`文件夹可触发
## v2.0.1.220911 alpha (2022-09-11) ## v2.0.1.220911 alpha (2022-09-11)

View File

@ -68,7 +68,7 @@ function getEnable(string $key, bool $default = false): bool
function getU(string $key): mixed function getU(string $key): mixed
{ {
$value = ''; $value = '';
$fillable = ['username', 'password', 'uid', 'csrf', 'cookie', 'access_token', 'refresh_token', 'sid']; $fillable = ['username', 'password', 'uid', 'csrf', 'cookie', 'access_token', 'refresh_token', 'sid', 'pc_cookie'];
if (in_array($key, $fillable)) { if (in_array($key, $fillable)) {
$value = Cache::get('auth_' . $key, 'Login'); $value = Cache::get('auth_' . $key, 'Login');
} }
@ -83,7 +83,7 @@ function getU(string $key): mixed
*/ */
function setU(string $key, mixed $value): void function setU(string $key, mixed $value): void
{ {
$fillable = ['username', 'password', 'uid', 'csrf', 'cookie', 'access_token', 'refresh_token', 'sid']; $fillable = ['username', 'password', 'uid', 'csrf', 'cookie', 'access_token', 'refresh_token', 'sid', 'pc_cookie'];
if (in_array($key, $fillable)) { if (in_array($key, $fillable)) {
Cache::set('auth_' . $key, $value, 'Login'); Cache::set('auth_' . $key, $value, 'Login');
} }