aboutsummaryrefslogtreecommitdiff
path: root/actions/join_groupchat.php
blob: 0d2d75c617dd288692cbf91023e8bd1dea7fdb79 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
<?php

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

if ($user && $group) {
	if (!check_entity_relationship($user->guid, 'groupchat', $group->guid)) {
		error_log("joinen ok");
		add_entity_relationship($user->guid, 'groupchat', $group->guid);
}
}
echo "OK";
error_log("join ok");

?>