所以天父的兒子(耶穌)若叫你們自由,你們就真自由了。(約翰福音 八:36)

2017/04/27 , 四 - 18:52 By 資深工讀生

opencart 有個問題竟然沒發現 .......
就是「忘記密碼」的功能有問題。
修正方法如下~~~(要修正兩個地方)

檔案一: reset.php

路徑:
upload/catalog/controller/account/reset.php

原本:
$this->model_account_customer->editPassword($customer_info['customer_id'], $this->request->post['password']);

換成:
$this->model_account_customer->editPassword($customer_info['email'], $this->request->post['password']);


檔案二:customer.php
upload/catalog/model/account/customer.php

原本:
$query = $this->db->query("SELECT customer_id, firstname, lastname FROM `" . DB_PREFIX . "customer` WHERE code = '" . $this->db->escape($code) . "' AND code != ''");

換成:
$query = $this->db->query("SELECT customer_id, firstname, lastname, email FROM `" . DB_PREFIX . "customer` WHERE code = '" . $this->db->escape($code) . "' AND code != ''");


謝謝!打完收工!

文章分類

我要回應~