Products

Solutions

Resources

Partners

Community

Blog

About

QA

Ideas Test

New Community Website

Ordinarily, you'd be at the right spot, but we've recently launched a brand new community website... For the community, by the community.

Yay... Take Me to the Community!

Welcome to the DNN Community Forums, your preferred source of online community support for all things related to DNN.
In order to participate you must be a registered DNNizen

HomeHomeUsing DNN Platf...Using DNN Platf...Using Modules a...Using Modules a...Changing password issueChanging password issue
Previous
 
Next
New Post
6/4/2015 4:34 PM
 

Hi,

I pasted the ChangePassword code from DNN's UserController.cs below. Irrespective of the return value of ChangePassword on MembershipProvider instance, the UpdatePassword is set to false. I thought only on successful password change the UpdatePassword field need to be set to false. Is this a bug? This is a issue as I have a custom password reset control when a user is forced to change the password on login by the admin, if the user enters the current password wrong, MembershipProvider's ChangePassword returns false then UpdatePassword is set to false, but the user didn't even change his password as requested by the admin.

public static bool ChangePassword(UserInfo user, string oldPassword, string newPassword)

        {

            bool retValue;

 

            //Although we would hope that the caller has already validated the password,

            //Validate the new Password

            if (ValidatePassword(newPassword))

            {

                retValue = MembershipProvider.Instance().ChangePassword(user, oldPassword, newPassword);

 

                //Update User

                user.Membership.UpdatePassword = false;

                UpdateUser(user.PortalID, user);

            }

            else

            {

                throw new Exception("Invalid Password");

            }

            return retValue;

        }

Also, what is the best way to validate that the user entered the right password before calling UserController's ChangePassword method to avoid this issue. I appreciate any help.

Thanks,

Ana

 
New Post
6/5/2015 11:23 AM
 
Which version of Platform are you seeing this behavior?

Ken Grierson
DotNetNuke Corporation
Test Lead
 
New Post
6/5/2015 1:42 PM
 

DNN 07.03.04

 
New Post
6/16/2015 6:04 PM
 

Any one??

 
New Post
6/18/2015 12:20 PM
 
that's a bug - please log it to support.dnnsoftware.com - as to the best way to validate it, ChangePassword is, as that integrates with other functions such as password history to verify that as well as being a valid string, the password has not been used (or is not the same as the username) when password history is enabled

Buy the new Professional DNN7: Open Source .NET CMS Platform book Amazon US
 
Previous
 
Next
HomeHomeUsing DNN Platf...Using DNN Platf...Using Modules a...Using Modules a...Changing password issueChanging password issue


These Forums are dedicated to discussion of DNN Platform and Evoq Solutions.

For the benefit of the community and to protect the integrity of the ecosystem, please observe the following posting guidelines:

  1. No Advertising. This includes promotion of commercial and non-commercial products or services which are not directly related to DNN.
  2. No vendor trolling / poaching. If someone posts about a vendor issue, allow the vendor or other customers to respond. Any post that looks like trolling / poaching will be removed.
  3. Discussion or promotion of DNN Platform product releases under a different brand name are strictly prohibited.
  4. No Flaming or Trolling.
  5. No Profanity, Racism, or Prejudice.
  6. Site Moderators have the final word on approving / removing a thread or post or comment.
  7. English language posting only, please.
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out