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

Modifying Registration Error #3854


User avatar
0
mmorales created

How can I modify the Registration Error view when username is already taken. Also how do I modify the error text for username already taken message.


2 Answer(s)
  • User Avatar
    0
    ismcagdas created
    Support Team

    Hi @mmorales,

    This localization key is defined in AbpZer.xml file, see <a class="postlink" href="https://github.com/aspnetboilerplate/aspnetboilerplate/blob/dev/src/Abp.ZeroCore/Zero/Localization/SourceExt/AbpZero.xml">https://github.com/aspnetboilerplate/as ... bpZero.xml</a>.

    You can override it's value as explained in this document <a class="postlink" href="https://aspnetboilerplate.com/Pages/Documents/Localization#DocExtending">https://aspnetboilerplate.com/Pages/Doc ... cExtending</a>.

    In AccountController, you can check returned identity result and throw a different error if you like.

    Thanks.

  • User Avatar
    0
    alper created
    Support Team

    hi,

    you can change it in localization file In AbpZero.xml find the row below and modify it.

    <text name="Identity.DuplicateUserName">User name '{0}' is already taken.</text>
    

    The localization file: <a class="postlink" href="https://github.com/aspnetboilerplate/aspnetboilerplate/blob/bc266e3503fcb2825684ec829cc356815f94f397/src/Abp.ZeroCore/Zero/Localization/SourceExt/AbpZero.xml">https://github.com/aspnetboilerplate/as ... bpZero.xml</a>