Example #1
0
 /**
  * Change customer password
  *
  * @param \Magento\Customer\Model\Customer $customer
  * @param string $newPassword
  * @return $this
  */
 public function changePassword(\Magento\Customer\Model\Customer $customer, $newPassword)
 {
     $customer->setPassword($newPassword);
     $this->saveAttribute($customer, 'password_hash');
     return $this;
 }
Example #2
0
 /**
  * Change customer password
  *
  * @param \Magento\Customer\Model\Customer $customer
  * @param string $newPassword
  * @return $this
  */
 public function changePassword(\Magento\Customer\Model\Customer $customer, $newPassword)
 {
     $customer->setPassword($newPassword);
     return $this;
 }