I want to get current user information using SPServices.SPGetCurrentUser, however, it can only get ID, the Name and other Fileds are always null.
<script type="text/javascript" src="http://code.jquery.com/jquery-1.8.2.min.js"></script> <script type="text/javascript" src="../Code/jquery.SPServices-0.7.2.js"></script> <script type="text/javascript"> $(function() { var thisUserID = $().SPServices.SPGetCurrentUser({ fieldName: "ID", debug: false }); alert("ID: "+thisUserID);
var thisUserAccount = $().SPServices.SPGetCurrentUser({ fieldName: "Name", debug: false }); alert("Name: "+ thisUserAccount); }); </script>
Can you tell me the reason and how to resolve it?
- Edited by SharePoint__Learning 4 hours 36 minutes ago