MembershipProvider.ChangePassword(String, String, String) Method
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Processes a request to update the password for a membership user.
public:
abstract bool ChangePassword(System::String ^ username, System::String ^ oldPassword, System::String ^ newPassword);
public abstract bool ChangePassword(string username, string oldPassword, string newPassword);
abstract member ChangePassword : string * string * string -> bool
Public MustOverride Function ChangePassword (username As String, oldPassword As String, newPassword As String) As Boolean
- username
- String
The user to update the password for.
- oldPassword
- String
The current password for the specified user.
- newPassword
- String
The new password for the specified user.
true
if the password was updated successfully; otherwise, false
.
For an example of a MembershipProvider implementation, see Implementing a Profile Provider.
Takes, as input, a user name, a current password, and a new password, and updates the password in the data source if the supplied user name and current password are valid.
Product | Versions |
---|---|
.NET Framework | 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1 |
.NET feedback
.NET is an open source project. Select a link to provide feedback: