IUserDetailsService ChangePassword Method (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

[ObsoleteAttribute("Use the overload with tenantId parameter.")]
bool ChangePassword(
	string userName,
	string oldPassword,
	string newPassword
)

Parameters

userName
Type: System String
User Name(Mandatory)
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

Publuic void ChangePassword()
{
    string userName = "[email protected]";
    string oldPassword = "company";
    string newPassword = "company1";
    IUserDetailsService userDetailsService = (IUserDetailsService)ServiceLocator.GetServiceImplementation(typeof(IUserDetailsService));
    userDetailsService.ChangePassword(userName, oldPassword, newPassword);
}
See Also