Click or drag to resize
AuthenticationHelperResetPassword Method
Resets password for user based on his request.

Namespace: CMS.Membership
Assembly: CMS.Membership (in CMS.Membership.dll) Version: 12.0.0
Syntax
C#
public static string ResetPassword(
	string hash,
	string requestTime,
	int userID,
	double interval,
	string newPassword,
	string source,
	string sendEmailFrom,
	string siteName,
	MacroResolver resolver,
	out bool success,
	string invalidRequestText,
	string exceededTimeText
)

Parameters

hash
Type: SystemString
Request hash (identifier).
requestTime
Type: SystemString
Request time.
userID
Type: SystemInt32
User id.
interval
Type: SystemDouble
Interval in which user can reset her password.
newPassword
Type: SystemString
New password.
source
Type: SystemString
Source of the request, used for logging.
sendEmailFrom
Type: SystemString
Email address of the sender.
siteName
Type: SystemString
Site name.
resolver
Type: CMS.MacroEngineMacroResolver
Macro resolver used to resolve values in confirmation e-mail template.
success
Type: SystemBoolean
Returns whether sending of request was successful.
invalidRequestText
Type: SystemString
Text returned by this method if request is invalid.
exceededTimeText
Type: SystemString
Text returned by this method if time request is exceeded.

Return Value

Type: String
Message with result description.
Remarks
In case the CMSSendPasswordResetConfirmation setting key is set to true, a confirmation email is sent to the user after successful password reset.
See Also