Jump to content

modification authentification.tpl quelles lignes supprimer ?


bugg

Recommended Posts

bonsoir,
j'ai suivi avec grand intérêt le forum modifier authentification.tpl pour groupe clent mais j'ai dûme planter quelque part, car lorsque je termine l'incription, la page authentification.php reste blanche
merci d'avance code origine =[/b[color=pink]]


$customer->active = 1;
if (!$customer->add())
$errors[] = Tools::displayError('an error occurred while creating your account');
else
{
$address->id_customer = intval($customer->id);
if (!$address->add())
$errors[] = Tools::displayError('an error occurred while creating your address');
else
{
if (!Mail::Send(intval($cookie->id_lang), 'account', 'Welcome!',
array('{firstname}' => $customer->firstname, '{lastname}' => $customer->lastname, '{email}' => $customer->email, '{passwd}' => Tools::getValue('passwd')), $customer->email, $customer->firstname.' '.$customer->lastname))
$errors[] = Tools::displayError('cannot send email');
$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;
Module::hookExec('createAccount', array(
'_POST' => $_POST,
'newCustomer' => $customer
));
if ($back)
Tools::redirect($back);
}code modifié :
$customer->active = 1;
if (!$customer->add(true,true,Tools::getValue('id_group',1)))
$errors[] = Tools::displayError('an error occurred while creating your account');
else
{
$address->id_customer = intval($customer->id);[/color]

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...