javascript – How can create a custom plugin to call my webapi after any registration or membership plugin functionality

Question

I have a js function for registration .
like this :## Heading ##
window.userSignUp = async function (e) {
e.preventDefault();
$(“.error-alert”).remove();
$(“.success-alert”).remove();
$(“.submit-button”).addClass(“disabled”);
var authLoginInput = new ABC.ABCAuthModule();
let signupRawData = {
fullName: $(“#fullname”).val(),
email: $(“#email”).val(),
password: $(“#password”).val(),
termConditionAccepted: true,
};
var userSignUpResponse = await authLoginInput.SignupRawData(
signupRawData
);
$(“.submit-button”).removeClass(“disabled”);
if (userSignUpResponse.status == 200) {
if (userSignUpResponse.data.statusCode == 200) {
$(
‘ ‘ +
userSignUpResponse.data.message +
“”
).insertBefore(“.first-input-box”);
$(“#signupForm”).trigger(“reset”);
} else {
$(
‘ ‘ +
userSignUpResponse.data.message +
“”
).insertBefore(“.first-input-box”);
}
//alert(userSignUpResponse.data.message);
} else {
$(
‘ ‘ +
userSignUpResponse.data.message +
“”
).insertBefore(“.first-input-box”);
//alert(userSignUpResponse.message);
}
};

want to create a custom plugin that can work after any registration plugin is used in any website,if i activate my plugin then this js registration function is called or either my webapi is hit and send the same data of registration plugin to my database.

0
Divya Choudhary 7 days 2022-11-22T23:24:36-05:00 0 Answers 0 views 0

Leave an answer

Browse
Browse