IUserDetailsService ResetPassword Method (String, String, String) CelloSaaS API Documentation
Resets the password for a user

Namespace: CelloSaaS.ServiceContracts.UserManagement
Assembly: CelloSaaS.ServiceContracts (in CelloSaaS.ServiceContracts.dll) Version: 4.3.1.0 (4.3.1.0)
Syntax

[ObsoleteAttribute("Use the overload with tenantId parameter.")]
void ResetPassword(
	string userName,
	string passwordQuestion,
	string passwordAnswer
)

Parameters

userName
Type: System String
User Name(Mandatory)
passwordQuestion
Type: System String
Password Question(Mandatory)
passwordAnswer
Type: System String
Password Answer(Mandatory)
Exceptions

ExceptionCondition
System.Data DataExceptionIf the security answer is incorrect.
CelloSaaS.ServiceContracts.UserManagement InvalidUserNameExceptionIf the user name is incorrect.
CelloSaaS.ServiceContracts.UserManagement UserDetailExceptionIf Any exception occurred, while connecting or modifying the database.
System ArgumentNullExceptionIf the user name or password question password answer is null or empty
Examples

public void ResetPassword()
{
    string userName = "[email protected]";
    string passwordQuestion = "What is your pet name?";
    string passwordAnswer = "admin";
    IUserDetailsService userDetailsService = (IUserDetailsService)ServiceLocator.GetServiceImplementation(typeof(IUserDetailsService));
    userDetailsService.ResetPassword(userName, passwordQuestion, passwordAnswer);
}
See Also