Quantcast
Viewing all articles
Browse latest Browse all 6517

New Post: SPGetCurrentUser not returning user information

Hello,pls help me....

my scripts reference in the master page
<asp:ScriptReference Path="../../SiteAssets/js/jquery-1.8.3.js"></asp:ScriptReference>
<asp:ScriptReference Path="../../SiteAssets/js/jquery.SPService 0.7.2.js"></asp:ScriptReference>

and code here


//alert("jQuery loaded? " + (jQuery == undefined ? "NO!!!" : "YES."));
//alert("SPServices loaded? " + (jQuery.SPServices == undefined ? "NO!!!" : "YES."));

$(document).ready(function()
{
$().SPServices({

operation: "GetGroupCollectionFromUser",
userLoginName: $().SPServices.SPGetCurrentUser(),
async: false,
completefunc: function(xData, Status) {
if ($(xData.responseXML).find("Group[Name='Site Admin']").length == 1) {
alert('Yes,Its Admin')
}   
     }}); 
});

I tried the above commented lines,my jquery is getting loaded ,but SPService is giving a no alert(not loading :( ) .. I tried an alert insdie SPService and i successfully got the alert,i dont understand wats the prob is !! >> pls help

Viewing all articles
Browse latest Browse all 6517

Trending Articles