Ahoi,
nach dem Einbau eines superkurzen Mods hatte ich heute exakt dasselbe Problem, das hier im Thread beschrieben wird.
Hat jemand eine Idee, wie der Mod angepasst werden muss, damit der Titel des Themas, auf das eine Antwort gepostet wurde, wieder in der Benachrichtigungs-E-Mail mitgeschickt wird?
Hier ist der sehr kurze Mod:
Code: Alles auswählen
##############################################################
## MOD Title: prevent reply notifications to unauthorized users
## MOD Author: asinshesq < asinsh@speakeasy.net > (Alan Sinsheimer) N/A
## MOD Description: PHPBB does not check the current authorization of a user when it sends reply
## notification emails to all users listed in the topic watch table. This means for example that if a user
## is moved to a new group that does not have access to a given forum (or gets deactivated), the user
## will continue to receive email notifications of replies to topics he posted in that appear in that forum.
## Then, when he folows the link in the email, he is told no such topic or post exists (since he is no longer authorized
## to be in that forum). This mod fixes that behavior by ensuring that only users who are authorized to read
## a given forum receive email notifications of replies in that forum.
##
## MOD Version: 1.0.5a
##
## Installation Level: Easy
## Installation Time: 1 Minute
##
## Files To Edit: includes/functions_post.php
##
## Included Files: N/A
##
## License: http://opensource.org/licenses/gpl-license.php GNU General Public License v2
##
#
#-----[ OPEN ]------------------------------------------
#
includes/functions_post.php
#
#-----[ FIND ]------------------------------------------
#
$sql = "SELECT u.user_id, u.user_email, u.user_lang
FROM " . TOPICS_WATCH_TABLE . " tw, " . USERS_TABLE . " u
WHERE tw.topic_id = $topic_id
AND tw.user_id NOT IN (" . $userdata['user_id'] . ", " . ANONYMOUS . $user_id_sql . ")
AND tw.notify_status = " . TOPIC_WATCH_UN_NOTIFIED . "
AND u.user_id = tw.user_id";
#
#-----[ REPLACE WITH ]------------------------------------------
#
// start mod prevent_reply_notification_emails_from_being_emailed_to_unauthorized_users...replaced the original
// $sql definition with the one that appears below
$sql = "SELECT DISTINCT u.user_id, u.user_email, u.user_lang
FROM " . TOPICS_WATCH_TABLE . " tw
INNER JOIN " . USERS_TABLE . " u ON tw.user_id = u.user_id
INNER JOIN " . USER_GROUP_TABLE . " ug ON tw.user_id = ug.user_id
LEFT OUTER JOIN " . AUTH_ACCESS_TABLE . " aa ON ug.group_id = aa.group_id,
" . FORUMS_TABLE . " f
WHERE tw.topic_id = $topic_id
AND tw.user_id NOT IN (" . $userdata['user_id'] . ", " . ANONYMOUS . $user_id_sql . ")
AND tw.notify_status = " . TOPIC_WATCH_UN_NOTIFIED . "
AND f.forum_id = $forum_id
AND u.user_active = 1
AND
(
( aa.forum_id = $forum_id AND aa.auth_read = 1 )
OR f.auth_read <= " . AUTH_REG . "
OR (u.user_level = " . MOD . " AND f.auth_read = " . AUTH_MOD . ")
OR u.user_level = " . ADMIN . "
)";
// end mod prevent_reply_notification_emails_from_being_emailed_to_unauthorized_users
#
#-----[ SAVE/CLOSE ALL FILES ]------------------------------------------
#
# EoM
LG, IPB_Flüchtling