mirror of
https://github.com/pierre42100/ComunicWeb
synced 2025-06-19 04:15:17 +00:00
Security questions form now lives
This commit is contained in:
@ -74,6 +74,37 @@ ComunicWeb.components.account.interface = {
|
||||
ComunicWeb.common.api.makeAPIrequest(apiURI, params, true, callback);
|
||||
},
|
||||
|
||||
/**
|
||||
* Get passowrd reset token using security answer
|
||||
*
|
||||
* @param {String} email The email address of the account
|
||||
* @param {Array} answers The answers to the security questions
|
||||
* @param {Function} callback
|
||||
*/
|
||||
resetPasswordWithSecurityAnswers: function(email, answers, callback){
|
||||
|
||||
//Prepare answers
|
||||
answersText = "";
|
||||
answers.forEach(function(answer){
|
||||
|
||||
if(answersText != "")
|
||||
answersText += "&";
|
||||
|
||||
answersText += encodeURIComponent(answer);
|
||||
|
||||
});
|
||||
|
||||
//Perform the request
|
||||
var apiURI = "account/check_security_answers";
|
||||
var params = {
|
||||
email: email,
|
||||
answers: answersText
|
||||
};
|
||||
ComunicWeb.common.api.makeAPIrequest(apiURI, params, true, callback);
|
||||
|
||||
},
|
||||
|
||||
|
||||
/**
|
||||
* Request the export of all the data of the user
|
||||
*
|
||||
|
Reference in New Issue
Block a user