title: Change Customer Login Password in Magento
body: <p>I want to Change Login Password of a customer in <code>Magento</code>, I Uses the below Code to Update the Password But It doesn't work for me</p>
  
  <pre><code> $customerid = 46;
   $oldpassword = 12345678;
   $newpassword = 87654321;
   $customer = Mage::getModel('customer/customer')-&gt;load($customerid);
   $passwordhash = $customer['password_hash'];
   $phasharray = explode(":",$passwordhash);
   $passpostfix = $phasharray[1];
   $completeOldPassword =  $oldpassword.":".$passpostfix;
   if($completeOldPassword==$passwordhash){
      $customer-&gt;setPassword($newpassword);
      $customer-&gt;save();
   }
  </code></pre>