Open Closed

Modifying Registration Error #3854


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)
  • 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.

  • 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>