Quantcast
Channel: jQuery Library for SharePoint Web Services
Viewing all articles
Browse latest Browse all 6517

New Post: SPServices SPGetCurrentUser does not retrieve any info

$
0
0
I have been having some difficulty getting this to work.

We are currently on Office 365.
SPServices on the whole works - we have a production system using some commands.

However, I have been having some trouble with SPGetCurrentUser working.
At first I tried using version 0.7.2 together with jquery 1.8.3 in a different site collection but discovered that it won't work since I need to be able to see the current site plus '_layout/userdisp.aspx'

So I switched to using SPServices 2013.01 but it still didn't work. Here is my code snippet:
//Get the user loginName
var currentuserval = $().SPServices.SPGetCurrentUser({
    webURL: 'https://mydomain.sharepoint.com',
    fieldName: 'Title',
    debug: true
});
alert(currentuserval);
After that didn't work, I tried something simpler:
alert($().SPServices.SPGetCurrentSite());
alert($().SPServices.SPGetCurrentUser({webURL:'https://mydomain.sharepoint.com', fieldName:'Title'}));
I still get a blank for the result. I tried to use SPGetCurrentUser on my root site but still have the same blank issue.

Viewing all articles
Browse latest Browse all 6517

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>