diff --git a/main/forum/newthread.php b/main/forum/newthread.php index cb0ae34457..c26efcfa60 100755 --- a/main/forum/newthread.php +++ b/main/forum/newthread.php @@ -118,6 +118,11 @@ if ($current_forum['forum_of_group'] != 0) { } } +// 6. Invited users can't create new threads +if (api_is_invited_user()) { + api_not_allowed(true); +} + $session_toolgroup = 0; if ($origin == 'group') { $session_toolgroup = intval($_SESSION['toolgroup']); diff --git a/main/forum/viewforum.php b/main/forum/viewforum.php index 45355a1f46..592c10b689 100755 --- a/main/forum/viewforum.php +++ b/main/forum/viewforum.php @@ -295,7 +295,7 @@ if (api_is_allowed_to_edit(false, true) OR ($current_forum['allow_new_threads'] == 1 AND !isset($_user['user_id']) AND $current_forum['allow_anonymous'] == 1) ) { if ($current_forum['locked'] <> 1 AND $current_forum['locked'] <> 1) { - if (!api_is_anonymous()) { + if (!api_is_anonymous() && !api_is_invited_user()) { if ($my_forum == strval(intval($my_forum))) { echo ''. Display::return_icon('new_thread.png',get_lang('NewTopic'),'',ICON_SIZE_MEDIUM).'';