Skip to content

Conversation

@Anxhul10
Copy link
Contributor

@Anxhul10 Anxhul10 commented Feb 20, 2025

Proposed changes (including videos or screenshots)

  • Added front-end validation to display an error message when a user attempts to register with an email that's already in use.
  • Updated the backend to return a specific error code for duplicate email registration attempts.

Screenshot from 2025-02-20 22-41-08

Screencast.from.2025-02-20.22-40-53.webm

Issue(s)

Closes #35263
CORE-1011

Steps to test or reproduce

Further comments


This pull request addresses an issue in the Rocket.Chat user registration process by implementing a fix for email validation to prevent duplicate email registrations. The changes include:

  1. UI Validation: A changeset has been introduced to enhance the registration form's email validation, ensuring that users cannot register with an email that is already in use.

  2. API Enhancement: The user registration API endpoint (users.register) has been updated to include an email availability check. The checkEmailAvailability function is now used to verify if the provided email already exists in the system. If the email is found to be already registered, an error is returned, preventing the creation of a new user with the same email.

These changes are made in the source branch fix/email-already-registered and are intended to be merged into the develop branch.

@dionisio-bot
Copy link
Contributor

dionisio-bot bot commented Feb 20, 2025

Looks like this PR is not ready to merge, because of the following issues:

  • This PR is targeting the wrong base branch. It should target 7.9.0, but it targets 7.8.0

Please fix the issues and try again

If you have any trouble, please check the PR guidelines

@changeset-bot
Copy link

changeset-bot bot commented Feb 20, 2025

🦋 Changeset detected

Latest commit: dc912dd

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 37 packages
Name Type
@rocket.chat/meteor Patch
@rocket.chat/web-ui-registration Patch
@rocket.chat/core-typings Patch
@rocket.chat/rest-typings Patch
@rocket.chat/uikit-playground Patch
@rocket.chat/api-client Patch
@rocket.chat/apps Patch
@rocket.chat/core-services Patch
@rocket.chat/cron Patch
@rocket.chat/ddp-client Patch
@rocket.chat/freeswitch Patch
@rocket.chat/fuselage-ui-kit Patch
@rocket.chat/gazzodown Patch
@rocket.chat/http-router Patch
@rocket.chat/livechat Patch
@rocket.chat/model-typings Patch
@rocket.chat/ui-contexts Patch
@rocket.chat/account-service Patch
@rocket.chat/authorization-service Patch
@rocket.chat/ddp-streamer Patch
@rocket.chat/omnichannel-transcript Patch
@rocket.chat/presence-service Patch
@rocket.chat/queue-worker Patch
@rocket.chat/stream-hub-service Patch
@rocket.chat/license Patch
@rocket.chat/omnichannel-services Patch
@rocket.chat/pdf-worker Patch
@rocket.chat/presence Patch
rocketchat-services Patch
@rocket.chat/models Patch
@rocket.chat/network-broker Patch
@rocket.chat/mock-providers Patch
@rocket.chat/ui-avatar Patch
@rocket.chat/ui-client Patch
@rocket.chat/ui-video-conf Patch
@rocket.chat/ui-voip Patch
@rocket.chat/instance-status Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@Anxhul10 Anxhul10 changed the title fix:UI validation for existing email during user registration fix: UI validation for existing email during user registration Feb 20, 2025
@Anxhul10
Copy link
Contributor Author

I just realized that 'tasked' issues are already assigned.
As tasked issues have been referred to the devs for them to fix. Should I close this PR, or would it still be helpful in any way? I'll make sure to pick unassigned issues next time.

Copy link
Member

@MartinSchoeler MartinSchoeler left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I just realized that 'tasked' issues are already assigned. As tasked issues have been referred to the devs for them to fix. Should I close this PR, or would it still be helpful in any way? I'll make sure to pick unassigned issues next time.

I don't think anyone is working on that at the moment, so it should be fine

Can you fix the lint errors?

Thanks!

@Anxhul10
Copy link
Contributor Author

I just realized that 'tasked' issues are already assigned. As tasked issues have been referred to the devs for them to fix. Should I close this PR, or would it still be helpful in any way? I'll make sure to pick unassigned issues next time.

I don't think anyone is working on that at the moment, so it should be fine

Can you fix the lint errors?

Thanks!

I have fixed the lint errors .
but it fails at CI / deploy-preview (pull_request) Failing after 3m

MartinSchoeler
MartinSchoeler previously approved these changes Feb 25, 2025
@Anxhul10 Anxhul10 requested a review from KevLehman February 25, 2025 20:04
@scuciatto scuciatto added the stat: QA assured Means it has been tested and approved by a company insider label Apr 17, 2025
@dionisio-bot dionisio-bot bot added the stat: ready to merge PR tested and approved waiting for merge label Apr 17, 2025
@Anxhul10
Copy link
Contributor Author

Anxhul10 commented Apr 21, 2025

Hi
I'm working on a PR and noticed that both yarn lint and yarn testunit fail—not just on my PR but also on a fresh clone of the latest develop branch. However, yarn build:ci passes in both cases.

yarn lint on fresh clone
Screenshot from 2025-04-21 20-17-00

yarn testunit on fresh repo
Screenshot from 2025-04-21 20-16-44

yarn build:ci on my current pr
Screenshot from 2025-04-21 20-16-01

yarn storybook on my pr as well as fresh repo ( left is my pr and right side is fresh repo )
Screenshot from 2025-04-21 20-34-30

I donot know what is causing the the workflow to fail . Can you please guide me how to fix it .

@scuciatto scuciatto modified the milestones: 7.6.0, 7.7.0 Apr 21, 2025
@dionisio-bot dionisio-bot bot removed the stat: ready to merge PR tested and approved waiting for merge label May 12, 2025
@scuciatto scuciatto modified the milestones: 7.7.0, 7.8.0 May 19, 2025
@dionisio-bot dionisio-bot bot added the stat: ready to merge PR tested and approved waiting for merge label May 19, 2025
@dougfabris dougfabris force-pushed the fix/email-already-registered branch from 148384f to 4274758 Compare June 18, 2025 17:53
@dionisio-bot dionisio-bot bot removed the stat: ready to merge PR tested and approved waiting for merge label Jun 18, 2025
@dougfabris dougfabris added stat: QA assured Means it has been tested and approved by a company insider and removed stat: QA assured Means it has been tested and approved by a company insider labels Jun 18, 2025
@dionisio-bot dionisio-bot bot added the stat: ready to merge PR tested and approved waiting for merge label Jun 18, 2025
@dougfabris dougfabris modified the milestones: 7.8.0, 7.9.0 Jun 20, 2025
@kodiakhq kodiakhq bot merged commit 61b77e4 into RocketChat:develop Jun 23, 2025
44 of 45 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

stat: QA assured Means it has been tested and approved by a company insider stat: ready to merge PR tested and approved waiting for merge

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Duplicate Email Registration Does Not Display On-Screen Error

9 participants