MyBB Community Forums

Full Version: Disable PM for New Reply
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hi all,

I'm wondering if/how I can disable the automatic sending of a private message to a user from uid 0 (MyBB Engine) when someone replies to a thread they posted in.  Any thoughts?

Thanks,
Sam
I don't think it is possible, they receive the message only if the user is subscribed to the thread with the option to receive the pm.
You can try to disable it removing the code that send the message.
Edit the file inc/datahandlers/post.php and at line 1208 search and remove this code:
				elseif($subscribedmember['notification'] == 2)
				{
					$post_code = md5($subscribedmember['loginkey'].$subscribedmember['salt'].$subscribedmember['regdate']);
					$pm = array(
						'subject' => array('pmsubject_subscription', $subject),
						'message' => array('pm_subscription', $subscribedmember['username'], $post['username'], $subject, $excerpt, $mybb->settings['bburl'], str_replace("&", "&", get_thread_link($thread['tid'], 0, "newpost")), $thread['tid'], $post_code),
						'touid' => $subscribedmember['uid'],
						'language' => $subscribedmember['language'],
						'language_file' => 'messages'
					);
					send_pm($pm, -1, true);
				}
			}
or using below SQL queries should help in fulfilling the requirement
UPDATE `mybb_users` SET `pmnotify` = '0'
ALTER TABLE `mybb_users` CHANGE `pmnotify` `pmnotify` INT(1) NOT NULL DEFAULT '0'

see also common sql queries guidance
Hey guys,

Thanks for this! I realize now I wasn't completely clear in my original post; is it possible to change the UID of this automatic private message? I'd like it to come from our Admin account instead of a MyBB Engine "account" that doesn't actually exist.

Thoughts?
sender name of the system PM can be changed by following this method. [see also this reply]
(2017-07-06, 12:12 AM)samwxlfe Wrote: [ -> ]Hey guys,

Thanks for this!  I realize now I wasn't completely clear in my original post; is it possible to change the UID of this automatic private message?  I'd like it to come from our Admin account instead of a MyBB Engine "account" that doesn't actually exist.

Thoughts?

Have you tried https://community.mybb.com/thread-85233.html ?

post #11 https://community.mybb.com/thread-85233-...pid1163397

or

https://community.mybb.com/thread-182607.html

or

maybe changing usedID -1 to a valid UID in database or .php file