We're reclaiming inactive PDIs to keep them available for active builders. Learn what's changing, who's affected, and how to protect your work. Read More

Password Reset (PwdEnrollmentManager)

CyrillW
Kilo Guru

Hello

I’ve come across a big question mark.

I’m currently looking at a script include called: 'PwdEnrollmentManager'
It contains the following code
<Code>

/* eslint-disable consistent-return */
	saveAndProceed: function() {
		var userSysId = this.getParameter('sysparm_user_id');
		var processSysId = this.getParameter('sysparm_procSysId');
		var accountName = String(this.getParameter('sysparm_accountName'));
		var process = new SNC.PwdProcess(processSysId);
		
		if (process == undefined) {
			return;
		}
		
		// Start logging the password reset request:
		// TODO: change request type to service type
		var trackingMgr = new SNC.PwdTrackingManager();
		var requestId = trackingMgr.createRequest(processSysId, userSysId, gs.getSessionID(), this.REQUEST_TYPE);
		
		var processName = process.getName();
		
		var status = "success";
		
	
			var isEnrolled = new SNC.PwdEnrollmentManager().isUserEnrolledByProcessId(userSysId, processSysId, requestId); // <- this
			if (!isEnrolled) {
				trackingMgr.createActivity(this.TYPE_ERROR, this.STAGE_IDENTIFICATION, 'User not Enrolled', requestId);
				status = gs.getMessage("User is eligible for the {0} Password Reset process, but must enroll for the process.", processName);
				}
// .....

I’d be interested to know exactly what this .isUserEnrolledByProcessId does.
I’m encountering a problem where the status message is being displayed.

However, I can’t figure out why this problem is occurring.

The file comes from the plugin with ID: com.glideapp.password_reset

Thanks for your Help 🙂
Regards

 

 

1 REPLY 1

CyrillW
Kilo Guru

I'm sorry, it's not the script include, but 'PwdAjaxVerifyIdentity' –> though the method is called: SNC.PwdEnrollmentManager