Useraccess: Display logged in users user group?

I knoe you can display a users name using <?php echo $ua_username; ?> but what about their user group? As in, admin or editor? Or, which group they are amember of?

It’s currently not available directly, but I can easily add that.

Can you for now check

<?php print_r($_SESSION['UA_GROUPS']); ?>

That’s an array.

Hi. I don’t actually need it now. I discovered that you can embed the stack protect stack, so as to almost create an if/then scenario, which worked fine.

But, I did test that array and it didn’t work. See screenshot.

Screenshot 2023-02-07 at 08.22.48

Actually that’s just a textual representation of the array, which looks like you are in a group administrators and admin.

Yes, correct. What I needed was just the user group name. But as I say, for me, sorted now.

I do have another question…

It looks like we can’t grant access to a protected stack to more than one group? Or, am I doing something wrong?

EDIT: Should explain: I want members of groups “admin” and “user” to see the protrected content. Not members of a group called “admin user”.

EDIT EDIT: Seperate by comma! GOT IT.

1 Like