Advertisement
Guest User

Untitled

a guest
Jun 18th, 2019
92
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.51 KB | None | 0 0
  1. function fGetUserId(X) {
  2.  
  3. $.ajax({ // get the Ids of users, return to populate IdArray
  4. url: xhost + "/portal/_api/web/SiteUsers?$select=Id&$filter=Email eq '" + X + "'",
  5. type: "GET", headers: { "Accept": "application/json;odata=verbose", }, //verbose
  6. success: function (data) {
  7. var xuserid = data.d.results[0].Id;
  8. return xuserid;
  9. },
  10. error: function (error) { alert(JSON.stringify(error)); }
  11. });
  12. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement