Quantcast
Channel: jQuery Library for SharePoint Web Services
Viewing all articles
Browse latest Browse all 6517

Commented Issue: userToJsonObject userId broken in 2013.0.1 [10144]

$
0
0
There's a typo in this function that prevents returning of a valid userId.
thisUser.**Id** should be thisUser.**id** instead.

```
function userToJsonObject(s) {
if (s.length === 0) {
return null;
} else {
var thisUser = new SplitIndex(s);
var thisUserExpanded = thisUser.value.split(",#");
if(thisUserExpanded.length === 1) {
return {userId: thisUser.Id, userName: thisUser.value};
} else {
return {
// SplitIndex(s) returns obj.id not obj.Id
// userId: thisUser.Id,
userId: thisUser.id,
userName: thisUserExpanded[0].replace( /(,,)/g, ","),
loginName: thisUserExpanded[1].replace( /(,,)/g, ","),
email: thisUserExpanded[2].replace( /(,,)/g, ","),
sipAddress: thisUserExpanded[3].replace( /(,,)/g, ","),
title: thisUserExpanded[4].replace( /(,,)/g, ",")
};
}
}
}
```
Comments: Thanks, Rainer. Fixed in 2010.02ALPHA1

Viewing all articles
Browse latest Browse all 6517

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>