-
Notifications
You must be signed in to change notification settings - Fork 189
FIX: Inconsistency in User Verification Status between Email and Phone Number & Password Field Not Reset On Email Update #2115
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from 8 commits
31fc87b
8c99e6c
288c76b
f2c57a3
5f461ee
94fa347
f1db6e3
f9778df
c0a90ee
2225746
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||||||||
---|---|---|---|---|---|---|---|---|---|---|
|
@@ -22,9 +22,10 @@ | |||||||||
.forProject(page.params.region, page.params.project) | ||||||||||
.users.updateEmailVerification($user.$id, !$user.emailVerification); | ||||||||||
await invalidate(Dependencies.USER); | ||||||||||
addNotification({ | ||||||||||
message: `${$user.name || $user.email || $user.phone || 'The account'} has been ${ | ||||||||||
!$user.emailVerification ? 'unverified' : 'verified' | ||||||||||
message: `The email${$user.name && ` for ${$user.name}`} ${ | ||||||||||
!$user.emailVerification ? 'is no longer verified' : ' has been verified' | ||||||||||
|
!$user.emailVerification ? 'is no longer verified' : ' has been verified' | |
!$user.emailVerification ? 'is no longer verified' : 'has been verified' |
Copilot uses AI. Check for mistakes.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ooops, small leading space there. I think this is not intentional, right? @Joyal-George-KJ
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this can be simplified for readability.
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The dynamic property guard here may insert undefined
if both name
and email
are missing. Use a nested ternary to explicitly handle each case, e.g., ${$user.name ?
for ${$user.name}: $user.email ?
for ${$user.email} : ''}
.
message: `The phone ${$user[$user.name ? 'name' : 'email'] && `for ${$user[$user.name ? 'name' : 'email']}`}${ | |
message: `The phone${$user.name ? ` for ${$user.name}` : $user.email ? ` for ${$user.email}` : ''}${ |
Copilot uses AI. Check for mistakes.
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[nitpick] Similarly here, both branches include a leading space—consider unifying whitespace handling outside the conditional to prevent inconsistent spacing in the final message.
message: `The phone ${$user[$user.name ? 'name' : 'email'] && `for ${$user[$user.name ? 'name' : 'email']}`}${ | |
!$user.phoneVerification ? ' is no longer verified' : ' has been verified' | |
message: `The phone ${$user[$user.name ? 'name' : 'email'] && `for ${$user[$user.name ? 'name' : 'email']}`} ${ | |
!$user.phoneVerification ? 'is no longer verified' : 'has been verified' |
Copilot uses AI. Check for mistakes.
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
same here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Using
$user.name &&
inside a template literal can yieldundefined
ifname
is falsy. Consider using a ternary:${$user.name ?
for ${$user.name}: ''}
to avoid inserting “undefined.”Copilot uses AI. Check for mistakes.
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's an empty string by default, so not needed