Jump to content

Neeed approvation of the new user registration


nasreddine hafidi

Recommended Posts

If you want to automatic disable the customer after the registrtaion and customer can only login after admin activate that customer from admin, then you can do that by adding the below code in "classes/form/CustomerForm.php" , submit()

Replace

try {
                $ok = $this->customerPersister->save(
                    $this->getCustomer(),
                    $clearTextPassword,
                    $newPassword,
                    $this->passwordRequired
                );
            } catch (PrestaShopException $e) {
                $this->errors[''][] = $this->translator->trans('Could not update your information, please check your data.', [], 'Shop.Notifications.Error');
                $ok = false;
            }

with

try {
                $ok = $this->customerPersister->save(
                    $this->getCustomer(),
                    $clearTextPassword,
                    $newPassword,
                    $this->passwordRequired
                );
                $emailField = $this->getField('email');
                $id_customer = Customer::customerExists($emailField->getValue(), true, true);
                $kb_customer_obj = new Customer($id_customer);
                $kb_customer_obj->active = 0;
                $kb_customer_obj->save();

            } catch (PrestaShopException $e) {
                $this->errors[''][] = $this->translator->trans('Could not update your information, please check your data.', [], 'Shop.Notifications.Error');
                $ok = false;
            }

 

  • Like 1
Link to comment
Share on other sites

  • 1 year later...

Thanks Mediacom, however in my opinion that's overpriced. $130 for this functionality does not seem good value. For $130 I'd expect a module to capture additional data like company bio, website address etc.

If the basic functionality was around $60 I'd purchase it without thinking about it, but $100+ would make me reconsider. That's just how my mind operates. Hopefully that's useful feedback for you.

Link to comment
Share on other sites

il y a 56 minutes, Rizzzle a dit :

Thanks Mediacom, however in my opinion that's overpriced. $130 for this functionality does not seem good value. For $130 I'd expect a module to capture additional data like company bio, website address etc.

If the basic functionality was around $60 I'd purchase it without thinking about it, but $100+ would make me reconsider. That's just how my mind operates. Hopefully that's useful feedback for you.

Don't worry, everyone runs their own business as they see fit.

All the best.

Link to comment
Share on other sites

Thanks. If you add advanced functionality on I would buy it. An optional/obligatory field that requires the user to enter their website address, address and social media. That would be really useful.

Link to comment
Share on other sites

Il y a 4 heures, Rizzzle a dit :

Thanks. If you add advanced functionality on I would buy it. An optional/obligatory field that requires the user to enter their website address, address and social media. That would be really useful.

It has nothing to do with the initial request or the functionality of this module, so there's no chance of me integrating it into this type of module. One module, one task, there must be specific modules for adding fields to customer files.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...