修复Token密钥登录

This commit is contained in:
温泉
2021-01-18 09:18:41 +08:00
parent 552c0d122a
commit cc7f47c359
+1 -1
View File
@@ -10,7 +10,7 @@ require '../function/function_core.php';
if ($_GET['mod'] === 'login'){
if (!empty($_POST['accesstoken'])) {
if (!$result = $db->select_first_row('sq_agent', '*', array('accesstoken' => $_POST['accesstoken']), 'AND')) {
if (!$result = $db->select_first_row('sq_admin', '*', array('accesstoken' => $_POST['accesstoken']), 'AND')) {
die(json_encode(array('code' => '-1', 'msg' => '秘钥错误')));
} else {
$_SESSION['admin_username'] = $result['username'];