From e8eba0684c44ee296f0c1e6e7878070f895cbcd5 Mon Sep 17 00:00:00 2001 From: Sendya <18x@loacg.com> Date: Sat, 4 Jun 2016 23:02:12 +0800 Subject: [PATCH] Fix : invite bug, register bug --- Data/version.lock | 2 +- Library/Controller/Auth.php | 6 +++--- Migrations/20160604144051_update_to1193.php | 17 +++++++++++++++++ Template/Default/admin/message.htm | 1 + Template/Default/panel/info.htm | 3 --- 5 files changed, 22 insertions(+), 7 deletions(-) create mode 100644 Migrations/20160604144051_update_to1193.php diff --git a/Data/version.lock b/Data/version.lock index 5b364900..22b7ad8f 100644 --- a/Data/version.lock +++ b/Data/version.lock @@ -1 +1 @@ -v1.18 \ No newline at end of file +v1.19.3 \ No newline at end of file diff --git a/Library/Controller/Auth.php b/Library/Controller/Auth.php index 0e1118a5..95fb7286 100644 --- a/Library/Controller/Auth.php +++ b/Library/Controller/Auth.php @@ -173,7 +173,7 @@ public function register() 'useTraffic' => Utils::flowAutoShow($user->flow_up + $user->flow_down), 'transfer' => Utils::flowAutoShow($user->transfer), 'expireTime' => date('Y-m-d H:i:s', $user->expireTime), - 'REGISTER_URL' => base64_encode($user->uid . "\t" . $forgePwdCode['verification'] . "\t" . $forgePwdCode['time']) + 'REGISTER_URL' => base64_encode($user->email . "\t" . $forgePwdCode['verification'] . "\t" . $forgePwdCode['time']) ]; $mail->content = Utils::placeholderReplace($mail->content, $params); $mailer->send($mail); @@ -235,7 +235,7 @@ public function resend() 'useTraffic' => Utils::flowAutoShow($user->flow_up + $user->flow_down), 'transfer' => Utils::flowAutoShow($user->transfer), 'expireTime' => date('Y-m-d H:i:s', $user->expireTime), - 'REGISTER_URL' => base64_encode($user->uid . "\t" . $forgePwdCode['verification'] . "\t" . $forgePwdCode['time']) + 'REGISTER_URL' => base64_encode($user->email . "\t" . $forgePwdCode['verification'] . "\t" . $forgePwdCode['time']) ]; $mail->content = Utils::placeholderReplace($mail->content, $params); $mailer->send($mail); @@ -255,7 +255,7 @@ public function verification() $list = explode("\t", base64_decode($_GET['verification'])); if (count($list) > 2) { - $user = User::getUserByUserId($list[0]); + $user = User::getUserByEmail($list[0]); $verification = trim($list[1]); $json = json_decode($user->forgePwdCode, true); $userVerificationCode = $json['verification']; diff --git a/Migrations/20160604144051_update_to1193.php b/Migrations/20160604144051_update_to1193.php new file mode 100644 index 00000000..b16cce2a --- /dev/null +++ b/Migrations/20160604144051_update_to1193.php @@ -0,0 +1,17 @@ +table('node'); + $column = $table->hasColumn('ratio'); + if(!$column) { + $table->addColumn('ratio', 'integer', ['limit' => MysqlAdapter::INT_TINY, 'default' => 1, 'comment' => '节点流量倍率']); + $table->save(); + } + } +} diff --git a/Template/Default/admin/message.htm b/Template/Default/admin/message.htm index 854f6e1e..76e97c55 100644 --- a/Template/Default/admin/message.htm +++ b/Template/Default/admin/message.htm @@ -176,6 +176,7 @@
+注意,请使用 <br />
换行,不要直接敲回车