Base solution for your next web application
Ends in:
01 DAYS
01 HRS
01 MIN
01 SEC
Open Closed

Any chance to extend the length of the UserName field to 64? #596


User avatar
0
cailleu created

Hi Mr. Halil İbrahim Kalkan,

First, I need to appreciate your amazing work, which has been helping me a lot to complete my recent project for my company. It would not have been easy without ABP. And I learned a lot myself.

Here goes my rationale for the request. Some of my end users experienced hard time signing up on the system based on ABP and Module Zero. Turns out they wanted to use an email address that is longer than 40 characters and is stored as UserName in Module Zero. Since this system is open for external customers, my IT department decided to let the end-users use their own email addresses as their usernames in order to reduce the rate of ID loss support tickets as well as to remove the intricacy of choosing a new username.

This appears to be a design change request so I found it necessary to go through any discussion via this community forum.

Thank you in advance, Henry from Vancouver, BC, Canada


3 Answer(s)
  • User Avatar
    0
    hikalkan created
    Support Team

    Hi,

    Thank you for your clarification. Understood it well. I can suggest 3 options:

    1. Accept user name or email address in login page, so users can login if they forget their user name.
    2. You can try to change the length by overriding OnModelCreating of your dbcontext using EF fluent configuration (remember to call base.OnModelCreating as first line).
    3. You can override UserName property in your User class. So, you can add [StringLength(64)] to that property.
    4. If none of these works, then we consider to make it longer in the framework.

    Have a nice day.

  • User Avatar
    0
    cailleu created

    Hi Halil,

    The option #3 works for me. Thanks for the suggestion and clarification. I didn't realize I could override the User class when I was not sure about the potential conflict within the module.

    Hope you have a wonderful new year, Henry

  • User Avatar
    0
    hikalkan created
    Support Team

    You're welcome. Happy new year you too :)