diff --git a/src/brainCloudClient-identity.js b/src/brainCloudClient-identity.js index 7c6f054..5d59115 100644 --- a/src/brainCloudClient-identity.js +++ b/src/brainCloudClient-identity.js @@ -604,18 +604,18 @@ function BCIdentity() { * Service Operation - CHANGE_EMAIL_IDENTITY * * @param oldEmailAddress Old email address - * @param authenticationToken Password for identity + * @param password Password for identity * @param newEmailAddress New email address * @param updateContactEmail Whether to update contact email in profile * @param callback The method to be invoked when the server response is received */ - bc.identity.changeEmailIdentity = function(oldEmailAddress, authenticationToken, newEmailAddress, updateContactEmail, callback) { + bc.identity.changeEmailIdentity = function(oldEmailAddress, password, newEmailAddress, updateContactEmail, callback) { bc.brainCloudManager.sendRequest({ service: bc.SERVICE_IDENTITY, operation: bc.identity.OPERATION_CHANGE_EMAIL_IDENTITY, data: { oldEmailAddress : oldEmailAddress, - authenticationToken : authenticationToken, + authenticationToken : password, newEmailAddress : newEmailAddress, updateContactEmail : updateContactEmail }, diff --git a/test/index.html b/test/index.html index b3ec958..cd7fceb 100644 --- a/test/index.html +++ b/test/index.html @@ -1880,7 +1880,10 @@ asyncTest("attachEmailIdentity()", 2, function() { bc.identity.attachEmailIdentity(UserA.email, - UserA.password, function(result) { + UserA.password, + UserA.email, + true, + function(result) { ok(true, JSON.stringify(result)); equal(result.status, 200, "Expecting 200"); start(); @@ -1897,18 +1900,10 @@ newEmail, true, function(result) { - - console.log("wtf"); - - console.log(JSON.stringify(result)); - ok(true, JSON.stringify(result)); - equal(result.status, 200, "Expecting 200"); + equal(result.status, 400, "Expecting 400"); start(); - - console.log("wtf"); }); - }); }