Resets a user's password to a new, automatically generated password.

Namespace: Novalys.VisualGuard.Security.WebForm
Assembly: Novalys.VisualGuard.Security.WebForm (in Novalys.VisualGuard.Security.WebForm.dll) Version: 2017.0.101.17 (2017.0.101.17)

Syntax

C#
public override string ResetPassword(
	string username,
	string passwordAnswer
)
Visual Basic
Public Overrides Function ResetPassword ( 
	username As String,
	passwordAnswer As String
) As String

Parameters

username
Type: System..::..String
the user to reset the password for.
passwordAnswer
Type: System..::..String
The password answer for the specified user.

Return Value

Type: String
The new password for the specified user.

Exceptions

ExceptionCondition
System..::..ArgumentNullExceptionusername is null.

or

If RequiresQuestionAndAnswer is set to true and the passwordAnswer is empty.
System..::..ArgumentExceptionusername or passwordAnswer is longer than 64 characters.
System..::..NotSupportedExceptionIf EnablePasswordReset is not set to true.
System.Web.Security..::..MembershipPasswordExceptionpasswordAnswer is invalid or user account is locked out.

See Also