aboutsummaryrefslogtreecommitdiff
path: root/mod/groups/actions/groups/edit.php
diff options
context:
space:
mode:
Diffstat (limited to 'mod/groups/actions/groups/edit.php')
-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);
}