I am in the process to create a Reset password module in my DNN 7.4.1 site . I am using this code as shown below to get the password of current user,
string UserName = HttpContext.Current.User.Identity.Name;
DotNetNuke.Entities.Users.UserInfo userInfo = DotNetNuke.Entities.Users.UserController.GetUserByName(base.PortalSettings.PortalId, UserName);
DotNetNuke.Security.Membership.MembershipProvider membershipProvider = DotNetNuke.Security.Membership.MembershipProvider.Instance();
if (membershipProvider.PasswordFormat == DotNetNuke.Security.Membership.PasswordFormat.Encrypted)
{
string oldPassword = DotNetNuke.Entities.Users.UserController.GetPassword(ref userInfo, userInfo.Membership.PasswordAnswer);
if (oldPassword == pwd.OldPassword)
{
....
}
I am getting an exception in the line which is Italic