aboutsummaryrefslogtreecommitdiff
path: root/mod/groups/actions/delete.php
blob: 7d66b2a254a27d400167cb2899d3111b7f63e373 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
<?php
	global $CONFIG;
		
	$guid = (int)get_input('group_guid');
	$entity = get_entity($guid);
	
	if (($entity) && ($entity instanceof ElggGroup))
	{
		if ($entity->delete())
			system_message(elgg_echo('group:deleted'));
		else
			register_error(elgg_echo('group:notdeleted'));
	}
	else
		register_error(elgg_echo('group:notdeleted'));
		
	$url_name = get_loggedin_user()->username;
	forward("{$vars['url']}pg/groups/member/{$url_name}");
?>