Skip to content

Fix storefront customer signup creation#78

Merged
roncodes merged 1 commit into
dev-v0.4.15from
feature/fix-storefront-customer-signup
May 29, 2026
Merged

Fix storefront customer signup creation#78
roncodes merged 1 commit into
dev-v0.4.15from
feature/fix-storefront-customer-signup

Conversation

@roncodes
Copy link
Copy Markdown
Member

Summary

  • ensure Storefront signup persists customer user type outside guarded mass assignment
  • reuse existing customer contacts by company/user/type before creating a new contact
  • return the identity conflict error instead of dereferencing a null customer after ContactObserver rejects creation

Root cause

Storefront attempted to mass-assign users.type = customer, but type is guarded on the core User model. Contact creation then triggered FleetOps customer identity validation and could throw UserAlreadyExistsException; Storefront recovered by looking up a contact by phone only, which could return null and crash at $customer->uuid.

Validation

  • php -l server/src/Http/Controllers/v1/CustomerController.php
  • git diff --check

Notes

  • Package Composer scripts were not run because this checkout does not have package-local server_vendor/bin or monorepo vendor/bin installed.
  • No documentation or API specification changes are needed; the request/response contract is unchanged.

@roncodes roncodes changed the title [codex] Fix storefront customer signup creation Fix storefront customer signup creation May 29, 2026
@roncodes roncodes changed the base branch from main to dev-v0.4.15 May 29, 2026 07:23
@roncodes roncodes marked this pull request as ready for review May 29, 2026 07:23
@roncodes roncodes merged commit b5e2689 into dev-v0.4.15 May 29, 2026
7 checks passed
@roncodes roncodes deleted the feature/fix-storefront-customer-signup branch May 29, 2026 07:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant