In catalog/controller/api/login.php file,
find:
Code: Select all
$this->load->model('account/api');
$api_info = $this->model_account_api->login($this->request->post['username'], $this->request->post['password']);
if ($api_info) {
$this->session->data['api_id'] = $api_info['api_id'];
$json['cookie'] = $this->session->getId();
$json['success'] = $this->language->get('text_success');
} else {
$json['error'] = $this->language->get('error_login');
}
Code: Select all
if (!isset($this->request->post['username']) || !isset($this->request->post['password'])) {
$json['error'] = $this->language->get('error_login');
} else {
$this->load->model('account/api');
$api_info = $this->model_account_api->login($this->request->post['username'], $this->request->post['password']);
if ($api_info) {
$this->session->data['api_id'] = $api_info['api_id'];
$json['cookie'] = $this->session->getId();
$json['success'] = $this->language->get('text_success');
} else {
$json['error'] = $this->language->get('error_login');
}
}