Pages

Showing posts with label Get Current User from Jquery. Show all posts
Showing posts with label Get Current User from Jquery. Show all posts

Thursday, March 1, 2012

How to get username from JQuery

Hello Friends


Use below Jquery to get the Current User name
var thisUserAccount = $().SPServices.SPGetCurrentUser({
                fieldName: "Title",
                debug: false
});

Use below code to get the ID for Current User
var thisUserAccount = $().SPServices.SPGetCurrentUser({
                fieldName: "ID",
                debug: false
});

Use below code to get the LoginName for Current User
var thisUserAccount = $().SPServices.SPGetCurrentUser({
                fieldName: "Name",
                debug: false
});

Disha Shah