diff options
author | root <root@migration.vz.lan> | 2012-10-23 09:04:43 +0000 |
---|---|---|
committer | root <root@migration.vz.lan> | 2012-10-23 09:04:43 +0000 |
commit | 074dc8fda6f634cc8c024a913d8033600b336b3a (patch) | |
tree | 1a9959d61e9f308b0a3443d9d67c00d26421581c /actions/leave_groupchat.php | |
download | elgg-074dc8fda6f634cc8c024a913d8033600b336b3a.tar.gz elgg-074dc8fda6f634cc8c024a913d8033600b336b3a.tar.bz2 |
initial commit.
Diffstat (limited to 'actions/leave_groupchat.php')
-rw-r--r-- | actions/leave_groupchat.php | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/actions/leave_groupchat.php b/actions/leave_groupchat.php new file mode 100644 index 000000000..079ad4898 --- /dev/null +++ b/actions/leave_groupchat.php @@ -0,0 +1,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"; +?> |