This method is used to create user details. After successful creation of user,
mail(Conformation/Password) will be send to user based on the configuration.
Namespace: CelloSaaS.ServiceContracts.UserManagementmail(Conformation/Password) will be send to user based on the configuration.
Assembly: CelloSaaS.ServiceContracts (in CelloSaaS.ServiceContracts.dll) Version: 4.3.1.0 (4.3.1.0)
Syntax
Parameters
- userDetails
- Type: CelloSaaS.Model.UserManagement UserDetails
User Details(Mandatory)
Return Value
Type: StringUser Identifier
Exceptions
Exception | Condition |
---|---|
System UnauthorizedAccessException | If the user has not the privilege |
CelloSaaS.ServiceContracts.UserManagement UserDetailException | If Any exception occurred, while connecting or modifying the database. |
CelloSaaS.ServiceContracts.UserManagement SendMailException | If any exception occurred while sending emails |
Examples
Public string AddUserDetails() { // Create instance for UserDetails UserDetails userDetails = new UserDetails(); //Fill membership details userDetails.MembershipDetails.EmailId = "[email protected]"; userDetails.MembershipDetails.UserName = "[email protected]"; userDetails.MembershipDetails.TenantCode = "B590CD25-3093-DF11-8DEB-001EC9DAB123"; //Fill Address Details userDetails.Address.Address1 = "Address"; userDetails.Address.City = "City"; userDetails.Address.State = "State"; userDetails.Address.CountryId = "3FD432E1-A8A4-4F22-BE65-DF751A1FBFE3"; // US userDetails.Address.PostalCode = "600025"; //Fill User Details userDetails.User.FirstName = "Company Admin"; userDetails.User.LastName = "Test"; IUserDetailsService userDetailsService = (IUserDetailsService)ServiceLocator.GetServiceImplementation(typeof(IUserDetailsService)); string userId = userDetailsService.AddUser(userDetails); }
See Also