mirror of
https://github.com/renbaoshuo/S2OJ.git
synced 2024-12-22 23:51:52 +00:00
fix: 2cd81ab055
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
parent
e8103b7b9a
commit
353ee59c07
@ -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;
|
||||
}
|
||||
|
||||
|
@ -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";
|
||||
}
|
||||
}
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user