Hi,
I am writing a script that automatically imports users into magento. Here is a code snippet:
$customer = Mage::getModel("customer/customer");
$customer->website_id = $websiteId;
$customer->setStore($store);
$customer->loadByEmail($riga[10]);
echo "Importo ".$data[0]."\n";
echo " email :".$data[10]."\n";
$customer->setTaxvat($data[7]);
$customer->lastname = $lastname;
$customer->email = $data[10];
$customer->password_hash = md5($data[0]);
$customer->save();
The problem is that the users are created as "not confirmed", while I would like them to be "confirmed".
I tried with:
$customer->setConfirmation('1');
before the save, but it didn't work. Does anybody know how to confirm the user?
Thanks!