99 Posts
SimonD
6 years ago
5
Topic

Hello,

I would like to test a field against the usergroup of each user.

But I find it diffucult to get the usergroup.

It is a bit diffucult for me because it seems that there are 3 tables involved: #__users, #__user_usergroup_map, #__usergroups

Thank you for your help

Get a Book for SEBLOD
1283 Posts
Bucklash
6 years ago
1
Level 1

#__...map is the one that matches the user with the group.  

What is the context of your test... ?

99 Posts
SimonD
6 years ago
0
Level 2

Hello Bucklash,

Thank you for your reply.

I would like to send email notification to a user but only if he belongs to a specific usergroup.

Regards

4229 Posts
Kadministrator
6 years ago
2
Level 1

Hi,

this a thing for Joomla API, you can use Access::getGroupsByUser($userId, $recursive = true).

99 Posts
SimonD
6 years ago
1
Level 2

Hello Klas,

Thank you for your reply.

I suppose I have to use Code pack plugin insn't it?

Regards

4229 Posts
Kadministrator
6 years ago
0
Level 3

Hi, yes.

Get a VIP membership