aboutsummaryrefslogtreecommitdiff
path: root/mod
diff options
context:
space:
mode:
Diffstat (limited to 'mod')
-rw-r--r--mod/groups/actions/addtogroup.php13
1 files changed, 6 insertions, 7 deletions
diff --git a/mod/groups/actions/addtogroup.php b/mod/groups/actions/addtogroup.php
index 1910a8196..eb079e959 100644
--- a/mod/groups/actions/addtogroup.php
+++ b/mod/groups/actions/addtogroup.php
@@ -21,12 +21,11 @@
$user_guid = array($user_guid);
$group_guid = get_input('group_guid');
-
+ if (sizeof($user_guid))
foreach ($user_guid as $u_id)
{
$requested = false;
- $user = get_entity($u_id);
- $group = get_entity($group_guid);
+ if ($user = get_entity($u_id) && $group = get_entity($group_guid)) {
if ($_SESSION['user']->getGUID() == $group->owner_guid)
{
@@ -87,12 +86,12 @@
else
register_error(elgg_echo("groups:usernotinvited"));
}
- }
+ }
+ }
+ else
+ register_error(elgg_echo("groups:notowner"));
}
- else
- register_error(elgg_echo("groups:notowner"));
}
forward($forward_url);
- exit;
?> \ No newline at end of file