Add a New User to an Existing Organization

The code snippet given below allows registering a user to an existing orginization without creating a new organization.

Note: LastName, EmailId and OrgIDare mandatory attributes.

Ensure the following packages are imported:

Package Imports
import com.zc.component.users.PlatformType; import com.zc.component.users.ZCSignUpData; import com.zc.component.users.ZCUser; import com.zc.component.ZCMailTemplateDetails;
//Get an instance of ZCSignUpData ZCSignUpData signUpdetails = ZCSignUpData.getInstance(); //Pass the necessary data for the sign-up using the instance ZCMailTemplateDetails mailData= signUpdetails.mailTemplateInstance(); mailData.setSendersMail(""); mailData.setSubject("Welcome to %APP_NAME%"); mailData.setMessage("

Hello ,

Follow this link to join in %APP_NAME% .


If you didn’t ask to join the application, you can ignore this email.


Your %APP_NAME% team

"); signUpdetails.setTemplateDetails(mailData); signUpdetails.setPlatformType(PlatformType.WEB); signUpdetails.userDetail.setEmailId(""); signUpdetails.userDetail.setLastName("Amelia"); signUpdetails.userDetail.setOrgId("35712181"); //Pass user's OrgID here //Register the user using signUpdetails signUpdetails = ZCUser.getInstance().addUser(signUpdetails);

Last Updated 2023-09-19 18:00:46 +0530 +0530