customerRegistry = $customerRegistry; $this->customerResourceModel = $customerResourceModel; } /** * Reset Authentication data for customer. * * @param int $customerId * @return $this */ public function saveAuth($customerId) { $customerSecure = $this->customerRegistry->retrieveSecureData($customerId); $this->customerResourceModel->getConnection()->update( $this->customerResourceModel->getTable('customer_entity'), [ 'failures_num' => $customerSecure->getData('failures_num'), 'first_failure' => $customerSecure->getData('first_failure'), 'lock_expires' => $customerSecure->getData('lock_expires'), ], $this->customerResourceModel->getConnection()->quoteInto('entity_id = ?', $customerId) ); return $this; } }