Repository navigation
fix(users): normalise emails, remove demo-user fallback - #1675
Merged
yusuftomilola merged 2 commits intoOct 17, 2026
Merged
yusuftomilola merged 2 commits into
yusuftomilola merged 2 commits into
Conversation
|
@portableDD is attempting to deploy a commit to the naijabuz's projects Team on Vercel. A member of the Team first needs to authorize it. |
|
@portableDD Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits. You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀 |
Closed
1 task
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #1575
Closes #1574
Closes #1573
Closes #1572
Summary
A@x.comanda@x.comcan register as separate accounts #1572: emails are trimmed and lower-cased in the register and login DTOs (@Transform) and again inUsersService.findByEmail/create, soJane@Corp.comandjane@corp.comare the same account (duplicate registration returns 409, login is case-insensitive, forgot-password also matches). Adds migrationNormaliseUserEmailsthat lower-cases existing rows and adds a unique index onlower(email). It aborts and lists the accounts if two existing users differ only by case, rather than merging them silently.GET /users/mefalls back to a fake ADMIN "demo user" instead of failing #1573: removes the hard-coded ADMIN "demo user" fallback inGET /users/me; a missing user id now throws 401. Uses@GetUser('id')instead of@Req() req: any. Adds a controller spec for the missing-user case.Linked issues
Closes #1575, #1574, #1573, #1572 (see top of description)
Checks
.envvalues are committedNot run: dependencies were not installed in this workflow, so lint, build and tests were not executed. The migration has not been run against a database. Known gap: a concurrent double-registration can still hit the new unique index as a 500 rather than a 409.