Commit bec4d579 authored by Nigel McNie's avatar Nigel McNie
Browse files

Implement the correct check for preventing owners being kicked out of a group. Fixes #2112.

The previous patch to that part of the code instead made it so you couldn't kick anyone out if the group ID equaled the group ID, which of course it always does.
parent bfefe0b6
......@@ -155,7 +155,7 @@ switch ($type) {
try {
switch ($v) {
case 'remove':
if ($id == $group->id) {
if ($user == $group->group) {
json_reply(true, get_string('memberchangefailed', 'group'));
}
else {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment