Wednesday, December 9, 2015

How to get User Information using SPServices?

In this below script, get User Information using SPServices, JQuery, Javascript and html

get User Information using SPServices
$().SPServices({
    operation: "GetUserInfo",
    async: false,
    userLoginName: $().SPServices.SPGetCurrentUser(),
    completefunc: function (xData, Status) {
        $(xData.responseXML).find("User").each(function() {
            curUserId = $(this).attr("ID");
            curUserName = $(this).attr("Name");
            curFullUserName = $(this).attr("ID")+";#"+$(this).attr("Name");
        });
    }
});

No comments:

Post a Comment