diff --git a/db/app_uoj233.sql b/db/app_uoj233.sql
index 70b46ed..45fd58e 100644
--- a/db/app_uoj233.sql
+++ b/db/app_uoj233.sql
@@ -444,7 +444,8 @@ CREATE TABLE `emails` (
`send_time` datetime DEFAULT NULL,
`priority` int NOT NULL DEFAULT 0,
PRIMARY KEY (`id`),
- KEY `send_time` (`send_time`)
+ KEY `send_time` (`send_time`),
+ KEY `priority` (`priority`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4;
/*!40101 SET character_set_client = @saved_cs_client */;
diff --git a/web/app/controllers/forgot_pw.php b/web/app/controllers/forgot_pw.php
index 5488b48..32cac41 100644
--- a/web/app/controllers/forgot_pw.php
+++ b/web/app/controllers/forgot_pw.php
@@ -72,7 +72,7 @@ $forgot_form->handle = function (&$vdata) {
转发源 IP:{$http_x_forwarded_for}
用户代理: {$user_agent}
- EOD);
+ EOD, 5);
DB::update([
"update user_info",
diff --git a/web/app/libs/uoj-utility-lib.php b/web/app/libs/uoj-utility-lib.php
index a4e69e7..ed0aa05 100644
--- a/web/app/libs/uoj-utility-lib.php
+++ b/web/app/libs/uoj-utility-lib.php
@@ -210,11 +210,11 @@ function sendSystemMsg($username, $title, $content) {
sendEmail($username, $title, $content);
}
-function sendEmail($username, $title, $content) {
+function sendEmail($username, $title, $content, $priority = 0) {
DB::insert([
"insert into emails",
- "(receiver, subject, content, created_at)",
- "values", DB::tuple([$username, $title, $content, DB::now()])
+ "(receiver, subject, content, created_at, priority)",
+ "values", DB::tuple([$username, $title, $content, DB::now(), $priority])
]);
}