aboutsummaryrefslogtreecommitdiff
path: root/mod/groups/actions
diff options
context:
space:
mode:
authorCash Costello <cash.costello@gmail.com>2012-07-16 19:20:35 -0700
committerCash Costello <cash.costello@gmail.com>2012-07-16 19:20:35 -0700
commitba8e725dbfead01810edb8619ecd0ec054a75812 (patch)
tree47892fa8ec3bd8f3f35fa127a0959394860426f2 /mod/groups/actions
parent6c9b6a031c6d8a8474bc5e7a1717a5ae3bee1535 (diff)
parent8c0897d92395d897a8e40a2d1b97e5f838520296 (diff)
downloadelgg-ba8e725dbfead01810edb8619ecd0ec054a75812.tar.gz
elgg-ba8e725dbfead01810edb8619ecd0ec054a75812.tar.bz2
Merge pull request #306 from sembrestels/limited-groups
Limited groups
Diffstat (limited to 'mod/groups/actions')
-rw-r--r--mod/groups/actions/groups/edit.php6
1 files changed, 5 insertions, 1 deletions
diff --git a/mod/groups/actions/groups/edit.php b/mod/groups/actions/groups/edit.php
index a3ad91622..df2464a65 100644
--- a/mod/groups/actions/groups/edit.php
+++ b/mod/groups/actions/groups/edit.php
@@ -41,10 +41,14 @@ $user = elgg_get_logged_in_user_entity();
$group_guid = (int)get_input('group_guid');
$new_group_flag = $group_guid == 0;
+if ($new_group_flag && elgg_get_plugin_setting('limited_groups', 'groups') == 'yes' && !elgg_is_admin_logged_in()) {
+ register_error(elgg_echo("groups:cantcreate"));
+ forward(REFERER);
+}
+
$group = new ElggGroup($group_guid); // load if present, if not create a new group
if (($group_guid) && (!$group->canEdit())) {
register_error(elgg_echo("groups:cantedit"));
-
forward(REFERER);
}