* Fix checkentry method.

This commit is contained in:
Yagami
2019-06-24 17:31:55 +08:00
parent d302f839d7
commit 2d73bfdd7d
+2 -2
View File
@@ -1662,7 +1662,7 @@ EOD;
if(!$this->checkEntryToken($entry)) $this->response('INVALID_TOKEN');
if($entry->freePasswd == 0 and empty($entry->account)) $this->response('ACCOUNT_UNBOUND');
if($_GET['f'] == 'user' and strtolower($_GET['m']) == 'apilogin' and $_GET['account'] and $entry->freePasswd) $entry->account = $_GET['account'];
if($_GET['m'] == 'user' and strtolower($_GET['f']) == 'apilogin' and $_GET['account'] and $entry->freePasswd) $entry->account = $_GET['account'];
$user = $this->dao->findByAccount($entry->account)->from(TABLE_USER)->fetch();
if(!$user) $this->response('INVALID_ACCOUNT');
@@ -1675,7 +1675,7 @@ EOD;
$this->session->set('user', $user);
$this->app->user = $user;
if($_GET['f'] == 'user' and strtolower($_GET['m']) == 'apilogin' and $_GET['account'] and $entry->freePasswd)
if($_GET['m'] == 'user' and strtolower($_GET['f']) == 'apilogin' and $_GET['account'] and $entry->freePasswd)
{
die(js::locate($this->config->webRoot));
}