Resets the password for a user
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)
- passwordQuestion
- Type: System String
Password Question(Mandatory)
- passwordAnswer
- Type: System String
Password Answer(Mandatory)
Exceptions
Exception | Condition |
---|---|
System.Data DataException | If the security answer is incorrect. |
CelloSaaS.ServiceContracts.UserManagement InvalidUserNameException | If the user name is incorrect. |
CelloSaaS.ServiceContracts.UserManagement UserDetailException | If Any exception occurred, while connecting or modifying the database. |
System ArgumentNullException | If 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