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

New Post: SPGetCurrentUser not returning user information

$
0
0
Hi All,

I'm having a similar but strange version of this problem. I am using Sharepoint Foundation 2013 with SPServices 0.7.2 and JQuery 1.8.3-min. I have confirmed both are loading as mentioned in the General Instructions in the documentation.

My code is as follows:
var thisUserAccount = $().SPServices.SPGetCurrentUser({
    fieldName: 'Title',
    debug: true
});

alert('>'+thisUserAccount+'<'); // I've also tried putting the getuser function directly in the alert. Same results.
When I run this under my Site Owner account it works perfectly, returning the display name of my account. When I run it under a regular user account, it returns blank. I am confident the permissions to the jQuery and SPServices js files are fine as I have another page of the site using the cascading dropdowns which works perfectly for all users.

There is no debug info given by SPServices. I tested the alert($().SPServices.SPGetCurrentSite()); function and this works correctly for all users.

Are there any other reasons why SPGetCurrentUser might return blank for regular users? Thanks for any help you can give.

Viewing all articles
Browse latest Browse all 6517

Trending Articles



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