Merge pull request #1057 from vishal-singh-webkul/gli-2061
Fixed: Wrong customer count after admin bans or deletes the customer on dashboard.
This commit is contained in:
@@ -84,11 +84,22 @@ class Blocknewsletter extends Module
|
||||
'actionCustomerAccountAdd',
|
||||
'registerGDPRConsent',
|
||||
'actionExportGDPRData',
|
||||
'actionDeleteGDPRCustomer'
|
||||
'actionDeleteGDPRCustomer',
|
||||
'actionObjectCustomerDeleteAfter',
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
public function hookActionObjectCustomerDeleteAfter($params)
|
||||
{
|
||||
$objCustomer = $params['object'];
|
||||
if (($register_status = $this->isNewsletterRegistered($objCustomer->email))
|
||||
&& $register_status > 0
|
||||
) {
|
||||
$this->unregister($objCustomer->email, $register_status);
|
||||
}
|
||||
}
|
||||
|
||||
public function hookActionExportGDPRData($customer)
|
||||
{
|
||||
if (!Tools::isEmpty($customer['email']) && Validate::isEmail($customer['email'])) {
|
||||
|
||||
@@ -266,6 +266,7 @@ class Dashactivity extends Module
|
||||
SELECT COUNT(*)
|
||||
FROM `'._DB_PREFIX_.'customer`
|
||||
WHERE `date_add` BETWEEN "'.pSQL($params['date_from']).'" AND "'.pSQL($params['date_to']).'"
|
||||
AND `deleted` = 0
|
||||
'.Shop::addSqlRestriction(Shop::SHARE_ORDER)
|
||||
);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user