Не могу получить id покупателя при неправленом вводе пароля Activity новая запись "неправильно введен пароль" при верном логине и ввода
OCstore 2.3
login.php
protected function validate() {
// Check how many login attempts have been made.
$login_info = $this->model_account_customer->getLoginAttempts($this->request->post['email']);
$this->load->model('account/customer');
// Add to activity log VARIANT-1
if ($this->config->get('config_customer_activity')) {
$this->load->model('account/activity');
$activity_data = array(
'customer_id' => $login_info['customer_id'],
'name' => $login_info['firstname'] . ' ' . $login_info['lastname'] );
$this->model_account_activity->addActivity('passwrong', $activity_data);
}
// Add to activity log VARIANT-2
if ($this->config->get('config_customer_activity')) {
$customer_info = $this->model_account_customer->getCustomerByEmail($this->request->post['email']);
if ($customer_info) {
$this->load->model('account/activity');
$activity_data = array(
'customer_id' => $customer_info['customer_id'],
'name' => $customer_info['firstname'] . ' ' . $customer_info['lastname']
);
$this->model_account_activity->addActivity('passwrong', $activity_data);
}
}
if ($login_info && ($login_info['total'] >= $this->config->get('config_login_attempts')) && strtotime('-1 hour') < strtotime($login_info['date_modified'])) {
$this->error['warning'] = $this->language->get('error_attempts');
}
// Check if customer has been approved.
$customer_info = $this->model_account_customer->getCustomerByEmail($this->request->post['email']);
if ($customer_info && !$customer_info['approved']) {
$this->error['warning'] = $this->language->get('error_approved');
}
if (!$this->error) {
if (!$this->customer->login($this->request->post['email'], $this->request->post['password'])) {
$this->error['warning'] = $this->language->get('error_login');
$this->model_account_customer->addLoginAttempt($this->request->post['email']);
} else {
$this->model_account_customer->deleteLoginAttempts($this->request->post['email']);
}
}
return !$this->error;
}
эти два варианта не дают результата.
Прошу помощи, как получить customer_id при вводе правильной почты и неправильном пароле для Activity