/** * Set customer password * @param $result * @return mixed */ public function setPassword($result) { $jsonval = new JsonValidate($this->data, '{"id":1, "hash":""}'); if (($errors = $jsonval->validate()) !== true) { $result['error'] = $errors; return $result; } $custMdl = new CustomerModel(); $res = $custMdl->editAuth($this->data->id, $this->data->hash, 1, 0); if ($res === false) { $result['error'] = "Could not set customer account status: " . $custMdl->errorInfo; } return $result; }