@Hemingway ,
I am very confused what you are trying to do here. Why do you have a user named group?😂
The function getUserData() searches the userData and groupData properties of the current user object. As you can see here, these objects are empty on my test user in the group testGroup after initial creation. It's not clear to me if you can modify these through the WebIQ Designer somehow. The User Data fields in the User Manager don't seem to affect these properties.
If I first call setUserData() and add some properties to this object, getUserData() will return them as expected.
Sample code is below
const um = shmi.requires("visuals.session.UserManager");
um.setUserData({
"hello": "world",
"deleteme": null,
"test" :1234
});
let a = um.getUserData('hello');
let b = um.getUserData('test');
console.log(a);
console.log(b);
... View more