This method is used to change the password
Namespace: CelloSaaS.ServiceContracts.UserManagementAssembly: CelloSaaS.ServiceContracts (in CelloSaaS.ServiceContracts.dll) Version: 4.3.1.0 (4.3.1.0)
Syntax
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: BooleanTrue - Password Changed Successfully/False
Exceptions
Exception | Condition |
---|---|
CelloSaaS.ServiceContracts.UserManagement UserDetailException | If Any exception occurred, while connecting or modifying the database. |
CelloSaaS.ServiceContracts.UserManagement InvalidUserNameException | If the user name is incorrect. |
System ArgumentNullException | If 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