How can I get the list of active and inactive users without using any plugin?
Discussion posts and replies are publicly visible
There's actually an already existing group called "All Users" that does exactly what Stefan said. It uses a rule to gather every user in the system to itself.
I don't know if this still holds true, but in the past users were flagged inactive by being placed in an "Inactive Users" group that you could find, though I can't seem to find it now.
Handy little snippet for finding all of your group IDs:
a!forEach( items: enumerate(300), expression: try( concat(fv!item, " - ", group(fv!item, "groupName")), "That's not a group" ))
You shouldn't try using try() for anything that ever might make it to production, but for your own investigation in /rule that you're going to throw away in minutes, I say knock yourself out.
is there any documentation for try()?
No! It is an internal only function. Do not use it as it could change any time without notice!
interesting.I was not aware that there is a set of "internal only" functions, but it makes sense.Just tried it in my personal sandbox and i think i got the basic idea, but yeah. We should avoid them.
Please bear in mind the part I said about it being "for your own research" and "thrown away in minutes". I'd never SAVE a rule with try() in it. I'd just test one and record the output for my notes. If you create it in /rule and just leave, then it vanishes without an object being created.
That's what I would want after getting this info. Granted, you'd have to recreate the rule every time you want to do this, but you should only want to once. Aside from the internal groups listed the first (and only?) time you run it, you'd just click on the group you wanted to know about (because you created it and it's clickable) and go to the properties.
That's what I read. It's just that there are people who just start doing it and then complain that it doesn't work anymore. That's why I always point out how I did it.