cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

UserGroups

Former Member
0 Kudos
308

Hi,

Could you please help the relationship between User and UserGroup.

I am unable to read the User Groups for the particular user using flexible search query.

Thank you. Regards, .M

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi Praveen,

I think the relation you are looking for is PrincipalGroupRelation. See if below query works for you:

    SELECT {u.uid}, {ug.uid}
     FROM {PrincipalGroupRelation  as pgr}, {User as u}, {UserGroup as ug}
     WHERE {u.pk}={pgr.source} AND {pgr.target}={ug.pk}

Hope this helps and Best Regards,