/ Published in: Other
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
// -- User Groups var groups = [ xml.text(gname) foreach var gname in wiki.api(site.api.."/users/"..user.id)['//groupname'] ]; // -- PUblic Groups to check against var pug = ['Public', 'Corp-US Citizen', 'Corp-US Person']; // -- Search for pub user var pub = true; foreach (var y in groups where pub ) { let pub = list.contains(pug,y); } // check the public/non-public status of the user if (pub == TRUE) { // User is Public "you are a public user"; } else { // user is NOT public // be awesome "you are NOT a public user"; }