aboutsummaryrefslogtreecommitdiff
path: root/mod/beechat/actions/leave_groupchat.php
blob: e04ab8846105ce16cf9247e45bb60474800363fc (plain)
1
2
3
4
5
6
7
8
9
10
11
12
<?php

$user = elgg_get_logged_in_user_entity();
$group = get_entity(get_input('group_guid'));

if ($user && $group) {
	if (check_entity_relationship($user->guid, 'groupchat', $group->guid))
		remove_entity_relationship($user->guid, 'groupchat', $group->guid);
}
error_log("leave ok");
echo "OK";
?>