aboutsummaryrefslogtreecommitdiff
path: root/mod/groups/actions/discussion
diff options
context:
space:
mode:
Diffstat (limited to 'mod/groups/actions/discussion')
-rw-r--r--mod/groups/actions/discussion/reply/save.php2
-rw-r--r--mod/groups/actions/discussion/save.php2
2 files changed, 2 insertions, 2 deletions
diff --git a/mod/groups/actions/discussion/reply/save.php b/mod/groups/actions/discussion/reply/save.php
index e535856da..109938dbb 100644
--- a/mod/groups/actions/discussion/reply/save.php
+++ b/mod/groups/actions/discussion/reply/save.php
@@ -25,7 +25,7 @@ if (!$topic) {
$user = get_loggedin_user();
$group = $topic->getContainerEntity();
-if (!$group->isMember($user)) {
+if (!$group->canWriteToContainer($user)) {
register_error(elgg_echo('groups:notmember'));
forward(REFERER);
}
diff --git a/mod/groups/actions/discussion/save.php b/mod/groups/actions/discussion/save.php
index 0b5d3b51c..a51775cd6 100644
--- a/mod/groups/actions/discussion/save.php
+++ b/mod/groups/actions/discussion/save.php
@@ -21,7 +21,7 @@ if (!$title || !$desc) {
}
$container = get_entity($container_guid);
-if (!$container || (!$container->isMember() && !$container->canEdit())) {
+if (!$container || !$container->canWriteToContainer()) {
register_error(elgg_echo('discussion:error:permissions'));
forward(REFERER);
}