Hi.
I had a custom username expression set in one of my portals, but I have run into an issue with it.
it works correctly when users try to signup, but when a user tries to save his profile without changing anything, the custom expression doesn't allow the user to save, even if the user has not (and can not) change the username.
I don't know what is the cause of this issue, but a reasonable fix would be not to enable this regular expression validator if the user is not allowed to change the username. though in secure/userprofile.aspx.cs around line 571, this:
if (WebConfigSettings.UserNameValidationExpression.Length > 0 && siteSettings.AllowUserFullNameChange)
should be used instead of:
if (WebConfigSettings.UserNameValidationExpression.Length > 0)
thanks.
(the expression is :[\s|\p{IsArabic}]+
I'm not familiar with javascript validation. but when rendered to the browser the backslashes are rendered escaped, which is [\\s|\\p{IsArabic}]+ . if I change the live code, it works in the userprofile page, but I wonder how does the same code works correctly in user registeration page without trouble making.
enabling the txtName control in userprofile.aspx also didn't help. so I thought it's better to disable the regular expression validator when user is not allowed to change the username)