[*] BO : You have now 3 new default groups. Unidentified group, guest group, and customer group.

This commit is contained in:
vChabot
2011-11-17 17:22:15 +00:00
parent fddc403a09
commit 67fc5d1600
11 changed files with 288 additions and 100 deletions
+18
View File
@@ -347,9 +347,18 @@ class AuthControllerCore extends FrontController
{
if (!$customer->is_guest)
{
$customer->cleanGroups();
// we add the guest customer in the default customer group
$customer->addGroups(array((int)Configuration::get('PS_CUSTOMER_GROUP')));
if (!$this->sendConfirmationMail($customer))
$this->errors[] = Tools::displayError('Cannot send email');
}
else
{
$customer->cleanGroups();
// we add the guest customer in the guest customer group
$customer->addGroups(array((int)Configuration::get('PS_GUEST_GROUP')));
}
$this->updateContext($customer);
@@ -470,9 +479,18 @@ class AuthControllerCore extends FrontController
{
if (!$customer->is_guest)
{
$customer->cleanGroups();
// we add the guest customer in the default customer group
$customer->addGroups(array((int)Configuration::get('PS_CUSTOMER_GROUP')));
if (!$this->sendConfirmationMail($customer))
$this->errors[] = Tools::displayError('Cannot send email');
}
else
{
$customer->cleanGroups();
// we add the guest customer in the guest customer group
$customer->addGroups(array((int)Configuration::get('PS_GUEST_GROUP')));
}
$this->updateContext($customer);
$this->context->cart->id_address_delivery = Address::getFirstCustomerAddressId((int)$customer->id);
$this->context->cart->id_address_invoice = Address::getFirstCustomerAddressId((int)$customer->id);