Groups API
From MoodleDocs
Database Structure
There are four core tables for Groups.
groups_members
| Field | Type | Info |
| id | int(10) | auto increment identifier |
| groupid | int(10) | The id of the group |
| userid | int(10) | The user's id |
| timeadded | int(10) | Time the group member was added |