IUserDetailsService ChangePassword Method (String, String, String, String) CelloSaaS API Documentation
This method is used to change the password

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

bool ChangePassword(
	string userName,
	string tenantId,
	string oldPassword,
	string newPassword
)

Parameters

userName
Type: System String
User Name(Mandatory)
tenantId
Type: System String
Tenant Identifier
oldPassword
Type: System String
Old Password(Mandatory)
newPassword
Type: System String
New Password(Mandatory)

Return Value

Type: Boolean
True - Password Changed Successfully/False
Exceptions

ExceptionCondition
CelloSaaS.ServiceContracts.UserManagement UserDetailExceptionIf Any exception occurred, while connecting or modifying the database.
CelloSaaS.ServiceContracts.UserManagement InvalidUserNameExceptionIf the user name is incorrect.
System ArgumentNullExceptionIf the user name or old password or new password or tenant id is null or empty
Examples

Public void ChangePassword()
{
    string userName = "[email protected]";
    string tenantId = "B590CD25-3093-DF11-8DEB-001EC9DAB123";
    string oldPassword = "company";
    string newPassword = "company1";
    IUserDetailsService userDetailsService = (IUserDetailsService)ServiceLocator.GetServiceImplementation(typeof(IUserDetailsService));
    userDetailsService.ChangePassword(userName, tenantId, oldPassword, newPassword);
}
See Also