Open-source manufacturing ERP, MES and QMS. Quoting, MRP, inventory, shop floor, quality and lot/serial traceability on one Postgres schema, with a REST API and MCP server. Self-host or use Carbon Cloud.
TypeScript ai-agentsbill-of-materialserpinventory-managementleanmanufacturingmanufacturing-execution-systemmcp-servermesmrpopen-source-erppostgresqlproduction-planningqmsquality-management-systemreact-routerself-hostedsupabasetraceabilitytypescript
fix: handle uppercase characters in email address
Brad Barbinb65bd7e5154f
diff --git a/apps/carbon/app/modules/users/users.server.ts b/apps/carbon/app/modules/users/users.server.tsindex 05394625a1..08a9b79ea0 100644--- a/apps/carbon/app/modules/users/users.server.ts+++ b/apps/carbon/app/modules/users/users.server.ts@@ -79,7 +79,7 @@ export async function createCustomerAccount(const insertUser = await createUser(client, {id: userId,- email,+ email: email.toLowerCase(),firstName: firstName ?? "",lastName: lastName ?? "",avatarUrl: null,@@ -185,7 +185,7 @@ export async function createEmployeeAccount(const insertUser = await createUser(client, {id: userId,- email,+ email: email.toLowerCase(),firstName,lastName,avatarUrl: null,@@ -281,7 +281,7 @@ export async function createSupplierAccount(const insertUser = await createUser(client, {id: userId,- email,+ email: email.toLowerCase(),firstName: firstName ?? "",lastName: lastName ?? "",avatarUrl: null,diff --git a/apps/carbon/app/routes/_public+/forgot-password.tsx b/apps/carbon/app/routes/_public+/forgot-password.tsxindex 32ac289666..e1a1d72123 100644--- a/apps/carbon/app/routes/_public+/forgot-password.tsx+++ b/apps/carbon/app/routes/_public+/forgot-password.tsx@@ -70,6 +70,8 @@ export async function action({ request }: ActionFunctionArgs): FormActionData {});}}+ } else {+ console.error(`No user found for email: ${email}`);}return json(success("Success"));diff --git a/apps/carbon/app/routes/x+/users+/employees.new.tsx b/apps/carbon/app/routes/x+/users+/employees.new.tsxindex c18503a8cd..47b654955b 100644--- a/apps/carbon/app/routes/x+/users+/employees.new.tsx+++ b/apps/carbon/app/routes/x+/users+/employees.new.tsx@@ -51,7 +51,7 @@ export async function action({ request }: ActionFunctionArgs) {const { email, firstName, lastName, locationId, employeeType } =validation.data;const result = await createEmployeeAccount(client, {- email,+ email: email.toLowerCase(),firstName,lastName,employeeType,diff --git a/packages/auth/src/services/users.server.ts b/packages/auth/src/services/users.server.tsindex 5d50faeb0c..ce1228132f 100644--- a/packages/auth/src/services/users.server.ts+++ b/packages/auth/src/services/users.server.ts@@ -12,7 +12,7 @@ export async function getUserByEmail(email: string) {return getCarbonServiceRole().from("user").select("*")- .eq("email", email)+ .eq("email", email.toLowerCase()).maybeSingle();}