Click or drag to resize

VGSecurityRuntimeChangePasswordQuestionAndAnswer Method (String, String, String, String)

Changes the password question and answer of the user.

Namespace:  Novalys.VisualGuard.Security
Assembly:  Novalys.VisualGuard.Security (in Novalys.VisualGuard.Security.dll) Version: 2019.1.831.19 (2019.1.0831.19)
Syntax
public VGPasswordQuestionAndAnswerModificationState ChangePasswordQuestionAndAnswer(
	string name,
	string password,
	string newQuestion,
	string newAnswer
)

Parameters

name
Type: SystemString
the name of the user.
password
Type: SystemString
the password of the given user.
newQuestion
Type: SystemString
The new password question of the user as string.
newAnswer
Type: SystemString
The new answer of the given password question as string.

Return Value

Type: VGPasswordQuestionAndAnswerModificationState
A VGPasswordQuestionAndAnswerModificationState representing the status of the modification.
Exceptions
ExceptionCondition
ArgumentNullException

The old password, the new password or the password confirmation are null.

The name is null.

ArgumentException

name, password, newAnswer is longer than 64 characters

or

The newQuestion question is longer than 256 characters

or

The name is empty.

NotSupportedException

the repository does not support Visual Guard authentication mode.

The name is empty.

Remarks

The password answer check is case sensitive. We strongly recommend to store the password answer as a lowered string and provide a lowered value of the password answer when you want to reset the password by using the password question and answer.

C#
user.ChangePasswordQuestionAndAnswer(myPassword.Text, newPasswordQuestion.Text, newPasswordAnswer.Text.ToLowerInvariant())

C#
user.ResetPassword(myPasswordAnswer.Text.ToLowerInvariant())

See Also