MembershipProvider.ChangePassword(String, String, String) Method
Definition
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
Parameters
- 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.
Returns
true
if the password was updated successfully; otherwise, false
.
Examples
For an example of a MembershipProvider implementation, see Implementing a Profile Provider.
Remarks
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.
Applies to
See also
Commenti e suggerimenti
https://aka.ms/ContentUserFeedback.
Presto disponibile: Nel corso del 2024 verranno gradualmente disattivati i problemi di GitHub come meccanismo di feedback per il contenuto e ciò verrà sostituito con un nuovo sistema di feedback. Per altre informazioni, vedereInvia e visualizza il feedback per