Reset Password

After the successful registration of a user, you can reset the password using the following code snippet. When called, the resetPassword() method generates a reset password link and sends it to the user’s Email address.


You can configure the sender’s email address, subject and the email message. You must add the email address in the Catalyst Mail Component and get it verified before using it in the SDK code.

Ensure the following packages are imported:

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("Burrows"); //Call reset password to send a mail to reset password ZCUser.getInstance().resetPassword(signUpdetails);

Last Updated 2023-10-16 12:55:33 +0530 +0530