Issue with password reset for usernames having hyphen

Rajani Radhakrishnan asked on August 15, 2019 17:04

Hi, The GeneratePasswordResetAsync function is not working for users who have a hyphen in their username(which is their email address itself) for our kentico application. I tried reading this and adding this key to config file for our application ,but didn't work:

I believe what we are looking for is something along the lines of what is mentioned in this stackoverflow URL, but that is applying the UserValidator on the ASPNET UserManager, we need to apply it on the Kentico Membership UserManager, but we are not able to figure out exactly how to do that.

Can someone help with this?

Recent Answers

vasu yerramsetti answered on August 19, 2019 10:48

@Rajani Radhakrishnan - What is your Kentico version? Exactly, where you are facing this issue (Portal Engine Or MVC).

0 votesVote for this answer Mark as a Correct answer

Eric Dugre answered on September 18, 2019 15:58


It looks like you can alter the UserValidator at any point, e.g. within a Controller as suggested here: But, you could probably also add this code to your Startup.Auth.cs file which initializes OWIN.

0 votesVote for this answer Mark as a Correct answer

   Please, sign in to be able to submit a new answer.