Commit d1cd5607 authored by Dave Cridland's avatar Dave Cridland

Merge pull request #123 from wmz7year/fixRostermanagerRemoveAdminException

Resolve the error when deleting group administrators
parents 38ee6492 a4b26b0f
......@@ -441,10 +441,11 @@ public class Group implements Cacheable, Externalizable {
}
// Fire event.
Map<String, String> params = new HashMap<String, String>();
if (adminCollection) {
Map<String, String> params = new HashMap<String, String>();
params.put("admin", user.toString());
if (alreadyGroupUser) {
params.put("member", user.toString());
GroupEventDispatcher.dispatchEvent(Group.this,
GroupEventDispatcher.EventType.member_removed, params);
}
......@@ -452,9 +453,9 @@ public class Group implements Cacheable, Externalizable {
GroupEventDispatcher.EventType.admin_added, params);
}
else {
Map<String, String> params = new HashMap<String, String>();
params.put("member", user.toString());
if (alreadyGroupUser) {
params.put("admin", user.toString());
GroupEventDispatcher.dispatchEvent(Group.this,
GroupEventDispatcher.EventType.admin_removed, params);
}
......
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