Jump to content

Create account only after admin validation


Recommended Posts

If user can not log in, user will not able to place an order (at least for prestashop the older than 1.4)


Anyway, I don't think there is setting for this. If you really want to do this, you will need a little code changes.

for 1.3x or older, change /authentication.php
for 1.4x, you will need to change /contollers/AuthController.php

change 1:
after user sign up, there are lines as following, you need to change $customer->active = 0

               $customer->active = 1;
               if (!$customer->add())



change 2:
after sign up, there are a few lines of code the log user in automatically.
You need comment out those lines and redirect to home page.

                       $smarty->assign('confirmation', 1);
                       $cookie->id_customer = intval($customer->id);
                       $cookie->customer_lastname = $customer->lastname;
                       $cookie->customer_firstname = $customer->firstname;
                       $cookie->passwd = $customer->passwd;
                       $cookie->logged = 1;
                       $cookie->email = $customer->email;

Link to comment
Share on other sites

×
×
  • Create New...