Skip to content

Commit

Permalink
Replaced wrong model (affiliate/affiliate) with right one (account/cu…
Browse files Browse the repository at this point in the history
…stomer)
  • Loading branch information
mrnfrancesco committed Jun 19, 2015
1 parent bcfd7d9 commit 9e5aa27
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion upload/catalog/controller/affiliate/login.php
Original file line number Diff line number Diff line change
Expand Up @@ -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');
Expand Down
2 changes: 1 addition & 1 deletion upload/catalog/controller/affiliate/register.php
Original file line number Diff line number Diff line change
Expand Up @@ -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']);

Expand Down

1 comment on commit 9e5aa27

@jeffz2012
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.