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