Skip to content
Permalink
Browse files

Replaced wrong model (affiliate/affiliate) with right one (account/cu…

…stomer)
  • Loading branch information...
mrnfrancesco committed Jun 19, 2015
1 parent bcfd7d9 commit 9e5aa27e04df686a7d687908fe4a0f0200d453b7
@@ -120,7 +120,7 @@ public function index() {
protected function validate() {
// Check how many login attempts have been made.
$login_info = $this->model_affiliate_affiliate->getLoginAttempts($this->request->post['email']);
$login_info = $this->model_account_customer->getLoginAttempts($this->request->post['email']);
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');
@@ -17,7 +17,7 @@ public function index() {
$affiliate_id = $this->model_affiliate_affiliate->addAffiliate($this->request->post);
// Clear any previous login attempts in not registered.
$this->model_affiliate_affiliate->deleteLoginAttempts($this->request->post['email']);
$this->model_account_customer->deleteLoginAttempts($this->request->post['email']);
$this->affiliate->login($this->request->post['email'], $this->request->post['password']);

1 comment on commit 9e5aa27

@jeffz2012

This comment has been minimized.

Copy link

jeffz2012 commented on 9e5aa27 Aug 14, 2016

Why is this wrong?
Why was it replaced?
Why do we check customer login attempts, when evaluating affiliate, who uses its own table set?

Please sign in to comment.
You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.