diff options
Diffstat (limited to 'phpBB/includes/ucp/ucp_pm_compose.php')
-rw-r--r-- | phpBB/includes/ucp/ucp_pm_compose.php | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/phpBB/includes/ucp/ucp_pm_compose.php b/phpBB/includes/ucp/ucp_pm_compose.php index ba06315363..d451e25be4 100644 --- a/phpBB/includes/ucp/ucp_pm_compose.php +++ b/phpBB/includes/ucp/ucp_pm_compose.php @@ -259,6 +259,25 @@ function compose_pm($id, $mode, $action) { trigger_error('NOT_AUTHORISED'); } + + // Passworded forum? + if ($post['forum_id']) + { + $sql = 'SELECT forum_password + FROM ' . FORUMS_TABLE . ' + WHERE forum_id = ' . (int) $post['forum_id']; + $result = $db->sql_query($sql); + $forum_password = (string) $db->sql_fetchfield('forum_password'); + $db->sql_freeresult($result); + + if ($forum_password) + { + login_forum_box(array( + 'forum_id' => $post['forum_id'], + 'forum_password' => $forum_password, + )); + } + } } $msg_id = (int) $post['msg_id']; |