The Elearning Community • Need to have list group members
Page 1 of 1

Need to have list group members

Posted: Fri Feb 22, 2019 11:30 am
by gihel
I must have a special analys to my site
I need to get a list of all the members of a group.
Can you tell me how to do this in the BDD
SQL langage or php as you want
Thank you

Re: Need to have list group members

Posted: Fri Feb 22, 2019 2:54 pm
by alfa24
if you mean framework groups:

select * from core_user where idst in (select idstMember from core_group_members as gm inner join core_group as g on gm.idst=g.idst where groupid like "/YOURGROUPNAME")

for other type of groups (inside a course, org charts, etc.), ask.

Re: Need to have list group members

Posted: Sun Mar 10, 2019 5:57 pm
by gihel
That fine
thank you.
Have you the way to find group from an user. I have logUser, userId and I would like to know list of members the same group.

Re: Need to have list group members

Posted: Sun Mar 10, 2019 6:09 pm
by alfa24
This is a little more difficult, as in Forma "groups" are generical entities used for levels, custom groups in a course, core groups, org chart trees (each tree defining two groups, one for the root, one for its descendants), and so on. So I'm afraid you have to be more specific to get the right query.

Re: Need to have list group members

Posted: Mon Mar 18, 2019 5:59 pm
by gihel
OK thank you very much