Gowtham

Gowtham

  • NA
  • 516
  • 40.7k

Get a user profile for administrator on share point home pge

Mar 17 2017 6:11 AM
Hi I came with this typical task.To get user profile for administrator on a home page.
I had through this website Get manager of current SharePoint user using SPServices and GetUserProfileByName[^].Though I couldn't get the result and lagging on understanding the concept.I don't get any clear picture. Please let me know the logics and about the solution.
 
 

$().SPServices({

operation: "GetUserProfileByName",

async: false,

AccountName: userName,

completefunc: function (xData, Status) {

managerName = $(xData.responseXML).text();

var managerLength = managerName.length;

var indexofManager = managerName.indexOf("Manager");

managerName = managerName.substring(indexofManager + 13, managerLength);

var indexOffalse = managerName.indexOf("false");

managerName = managerName.substring(0, indexOffalse);

 
For those code it shows xhr can't open. 

Answers (5)