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

$user = get_loggedin_user();
$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";
?>