error/group/erroraddremoveuser
From MoodleDocs
This error is produced by the code in /group/members.php which calls code in /group/lib.php which in turn calls code in /lib/dmllib.php.
The various functions involved result in a line of SQL which is sent to the database engine.
You can trap this SQL in /lib/dmllib.php with a line like
print("SQL to be run is $insertSQL");
if you insert the line at line 1555 in /lib/dmllib.php.
The text SQL to be run is INSERT INTO ..... will then appear at the top of the page that is cuasing the problem.