fix: 2cd81ab055
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
Baoshuo Ren 2023-02-15 17:17:14 +08:00
parent e8103b7b9a
commit 353ee59c07
Signed by: baoshuo
GPG Key ID: 00CB9680AB29F51A
2 changed files with 4 additions and 3 deletions

View File

@ -375,6 +375,7 @@ class UOJUser {
$extra = [];
}
mergeConfig($extra, [
'school' => null,
'permissions' => UOJContext::getMeta('users_default_permissions'),
'social' => [
'codeforces' => null,
@ -391,7 +392,7 @@ class UOJUser {
'username_color' => isSuperUser($user) ? '#9d3dcf' : '#0d6efd',
]);
if ($key == null) {
if ($key === null) {
return $extra;
}

View File

@ -14,14 +14,14 @@ return function ($type) {
DB::update([
"update user_info",
"set", [
"extra" => json_encode($extra, JSON_UNESCAPED_UNICODE)
"extra" => json_encode($extra, JSON_UNESCAPED_UNICODE),
],
"where", [
"username" => $user['username']
]
]);
echo "Updated user {$user['username']}. \n";
echo "Updated user {$user['username']} ({$extra['school']}).\n";
}
}
};