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
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