1
1
mirror of https://github.com/renbaoshuo/S2OJ.git synced 2025-03-30 18:37:03 +00:00

fix(web/register): return 404 when disable register

This commit is contained in:
Baoshuo Ren 2022-10-08 14:38:14 +08:00
parent 833c8c2c80
commit 30dc0d7d70
Signed by: baoshuo
GPG Key ID: 00CB9680AB29F51A

@ -1,4 +1,8 @@
<?php
if (!UOJConfig::$data['switch']['open-register'] && DB::selectCount("SELECT COUNT(*) FROM user_info")) {
become404Page();
}
function handleRegisterPost() {
if (!crsf_check()) {
return '页面已过期';