mirror of
https://github.com/renbaoshuo/S2OJ.git
synced 2024-11-09 17:18:42 +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 = [];
|
$extra = [];
|
||||||
}
|
}
|
||||||
mergeConfig($extra, [
|
mergeConfig($extra, [
|
||||||
|
'school' => null,
|
||||||
'permissions' => UOJContext::getMeta('users_default_permissions'),
|
'permissions' => UOJContext::getMeta('users_default_permissions'),
|
||||||
'social' => [
|
'social' => [
|
||||||
'codeforces' => null,
|
'codeforces' => null,
|
||||||
@ -391,7 +392,7 @@ class UOJUser {
|
|||||||
'username_color' => isSuperUser($user) ? '#9d3dcf' : '#0d6efd',
|
'username_color' => isSuperUser($user) ? '#9d3dcf' : '#0d6efd',
|
||||||
]);
|
]);
|
||||||
|
|
||||||
if ($key == null) {
|
if ($key === null) {
|
||||||
return $extra;
|
return $extra;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -14,14 +14,14 @@ return function ($type) {
|
|||||||
DB::update([
|
DB::update([
|
||||||
"update user_info",
|
"update user_info",
|
||||||
"set", [
|
"set", [
|
||||||
"extra" => json_encode($extra, JSON_UNESCAPED_UNICODE)
|
"extra" => json_encode($extra, JSON_UNESCAPED_UNICODE),
|
||||||
],
|
],
|
||||||
"where", [
|
"where", [
|
||||||
"username" => $user['username']
|
"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