Hi Everyone,
This is weird and it comes so random. When a user is creating their account, sometimes even though the account does not exist in the database and it is a new username, it is somehow get assigned by some role.
Say, I have 2 roles, user, and admin and the role that get assigned is so random and the user have this problem is so random too. I test myself registering again and again and the problem occurs sometimes even with the same username. To prevent that problem I did the following tweak but it doesn't seem to be helping.
if (this.utilities.IsUserInAdminRole())
{
Roles.RemoveUserFromRole(this.createdUsername, this.utilities.GetAdminRoleValue());
}
if (this.utilities.IsUserInUserRole())
{
Roles.RemoveUserFromRole(this.createdUsername, this.utilities.GetUserRoleValue());
}
...
Go to the complete details ...