Thursday, November 6, 2014

How to get current web user in Sharepoint javascript?

function verifyUser(userName){
       var context = new SP.ClientContext.get_current(); 
       var web = context.get_web();
       var user = web.ensureUser(userName);
       context.load(user); 
 
context.ExecuteQuery();
 
} 

No comments:

Post a Comment