Don't allow create new threads with the invited user role - refs BT#9070

1.10.x
Angel Fernando Quiroz Campos 10 years ago
parent a72b75657f
commit bb559ad8e8
  1. 5
      main/forum/newthread.php
  2. 2
      main/forum/viewforum.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']);

@ -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 '<a href="'.$forumUrl.'newthread.php?'.api_get_cidreq().'&amp;forum='.Security::remove_XSS($my_forum).$origin_string.'">'.
Display::return_icon('new_thread.png',get_lang('NewTopic'),'',ICON_SIZE_MEDIUM).'</a>';

Loading…
Cancel
Save