spUser.getUsers Method

Get users of current site

Namespace : jSPoint
Class : spUser
Released since : v0.2.0 (History)

  • Syntax
.getUsers(searchText, maxResults, success)

  • Parameters
searchText
Type : string
Text to search
maxResults
Type : int
Number max of result
success
Type : function(xml)
Actions to perform when data retrieve (xml parameter storing xml result, see people.asmx documentation for xml nodes details)

  • Example
// Show users with 'Doe' lastname in popup
jSPoint.spUser.getUsers("Doe", 20, function() {
  var result = new Array();

  $(xml).find('PrincipalInfo').each(function() {		
    result.push($(this).find('DisplayName').text());
  });

  alert(result);
});

Last edited Feb 13, 2011 at 5:19 PM by GurYN, version 1

Comments

No comments yet.