// fix problem about guest customer and default group id and the password display in the form (BO)
This commit is contained in:
@@ -361,6 +361,15 @@ class AdminCustomersControllerCore extends AdminController
|
||||
)
|
||||
);
|
||||
|
||||
// if customer is a guest customer, password hasn't to be there
|
||||
if ($obj->id && ($obj->is_guest && $obj->id_default_group == Configuration::get('PS_GUEST_GROUP')))
|
||||
{
|
||||
foreach ($this->fields_form['input'] as $k => $field)
|
||||
if ($field['type'] == 'password')
|
||||
array_splice($this->fields_form['input'], $k, 1);
|
||||
}
|
||||
|
||||
|
||||
if (Shop::isFeatureActive())
|
||||
{
|
||||
$this->fields_form['input'][] = array(
|
||||
|
||||
@@ -396,7 +396,7 @@ class AuthControllerCore extends FrontController
|
||||
if (!$customer->is_guest)
|
||||
{
|
||||
$customer->cleanGroups();
|
||||
// we add the guest customer in the default customer group
|
||||
// we add the 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');
|
||||
|
||||
Reference in New Issue
Block a user