I am writing a script that automatically imports users in magenta. Here is the 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 users are created as “unconfirmed”, although I would like them to be “verified”.
I tried:
$customer->setConfirmation('1');
before saving, but that didn't work. Does anyone know how to confirm a user?
Thanks!
magento
fdierre
source share