superprg Posted April 19, 2011 Share Posted April 19, 2011 Is there a setting in prestashop that after user creates an account, admin should validate first and after validation only the user is able to login Link to comment Share on other sites More sharing options...
jpadvertising Posted April 19, 2011 Share Posted April 19, 2011 I'm after the same thing. I hope someone can help.I'm using 1.3.6 Link to comment Share on other sites More sharing options...
shokinro Posted April 20, 2011 Share Posted April 20, 2011 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.phpfor 1.4x, you will need to change /contollers/AuthController.phpchange 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 More sharing options...
jpadvertising Posted April 22, 2011 Share Posted April 22, 2011 Just have two question...do I change the $customer->active = 1; to $customer->active = 0; ?as in the original file (authentication.php) it is: $customer->active = 1;could you show me how to comment out the lines in step 2 and how to redirect to home page.Thanks Link to comment Share on other sites More sharing options...
shokinro Posted April 22, 2011 Share Posted April 22, 2011 $customer->active = 1; to$customer->active = 0; ? Yes, you are right.I just meant to show you where is code. Didn't day is clearly. Link to comment Share on other sites More sharing options...
Recommended Posts