ModifyUserPropertyByAccountName - accountName param

Feb 8, 2012 at 7:14 PM

I was trying to create User Profile wizard using JQuery. I want to provide a option to admin to update other users profile. For that we have provided them the list of account id's in drop down. regional Admin can select there associates and update the profile. For that I have passed the accountName selected by user as parameter in the function. as shown below:

function userProf_saveUserProfileInfo(currentUser_Login, userPropertyXML)

{

$().SPServices({

operation: "ModifyUserPropertyByAccountName",

async:false, accountName: currentUser_Login,

 newData: userPropertyXML,

completefunc: function (xData, Status) { if(Status != "error") userProf_FunctionWhenSaveInfoComplete(); else userProf_FunctionWhenSaveInfoInComplete(); }

});

 };

But everytime logged in user profiles get updated. I want to know what is the purpose of this accountName. Though my issue was resolved after fetching the selected user's profile first before updating it but not sure whether fetching the user profile of selected user fix the issue or soemthing else. So want to know how the soap packet sets while we try to update other user's profile.

Coordinator
Feb 15, 2012 at 7:22 PM

sgaurav:

The way I understand the function, if you pass in a different user's accountName, that's the profile that should be updated. I'd take a look at the network traffic with the IE Developer Tools or Firebug to see what you're actually passing and getting back.

M.

Feb 22, 2012 at 5:31 PM

Thanks for the response. Yeah Soap header was not set properly. Its working fine now.