Open Closed

Should not be able to create a user with a username equal to the email address of another user #5482


User avatar
0
mkinc created
  • ABP Framework version: v7.2.1
  • UI type: Angular
  • DB provider: EF Core
  • Tiered (MVC) or Identity Server Separated (Angular): Separated OpenIdDict auth server
  • Exception message and stack trace:
  • Steps to reproduce the issue:
    • Log in as host admin
    • Create a user with username abc and email john.smith@example.com
    • Create another user with username john.smith@example.com and email john.smith2@example.com
  • Expected behaviour: Error when creating user to say a user already exists with email 'john.smith@example.com'.
  • Actual behaviour: User is created successfully, but the first user with username abc can now no longer log into their account using their email address.

Similar checks need to be made when attempting to change either username or password since no username should be identical with another user's email address (and vice versa). However it should be maintained that the username and email address of an individual user should be able to be the same. Please refund the question. Thanks.


4 Answer(s)
  • User Avatar
    0
    maliming created
    Support Team Fullstack Developer

    hi

    I will add code to prevent this. Your credit refunded.

  • User Avatar
    0
    mkinc created

    Thanks maliming. Would we expect to see this in 7.3.1 / 7.4.0 or something?

  • User Avatar
    0
    maliming created
    Support Team Fullstack Developer

    hi

    It may be available on 7.3.2

  • User Avatar
    0
    maliming created
    Support Team Fullstack Developer

    hi

    You can add the AbpIdentityUserValidator to solve it now.

    https://github.com/abpframework/abp/pull/17212

Made with ❤️ on ABP v9.1.0-preview. Updated on November 01, 2024, 05:35