2.0.19 How to block Private Messages only for a one user

This forum is now closed as part of retiring phpBB2
Forum rules
READ: phpBB.com Board-Wide Rules and Regulations

This forum is now closed due to phpBB2.0 being retired.
Post Reply
User avatar
Eric Cartman
Registered User
Posts: 77
Joined: Mon Apr 24, 2006 8:24 am
Location: South Kensington

2.0.19 How to block Private Messages only for a one user

Post by Eric Cartman » Wed Sep 13, 2006 9:40 am

I tried the code below but it didnt work well. Although it says 'The boss does NOT want to be disturbed' after sending a pm, the person can still receive pm's. Is there any other easy way like this to block private messages only for one user?
Thanks in advance.

Eric

OPEN privmsg.php

FIND

Code: Select all

 
         if ( $to_userdata['user_notify_pm'] && !empty($to_userdata['user_email']) && $to_userdata['user_active'] ) 


BEFORE, ADD

Code: Select all

 
            if ( $to_userdata['user_id'] == '3') 
            { 
              message_die(GENERAL_MESSAGE, 'The boss does NOT want to be disturbed');        
            }   


User avatar
-jm-
Former Team Member
Posts: 2024
Joined: Fri Jul 16, 2004 10:56 am
Location: Inside the mind of the machine
Contact:

Post by -jm- » Wed Sep 13, 2006 9:48 am

When you're posting a private message, posting.php is used :)
so every modification you want to do to avoid people PMing a specific user should be done over there :)

two side notes:
maybe it's better upgrading that vulnerable forum :)
look for thatbitextra MODs ... there's one that could be useful for your purpose :P
-jm- (a.k.a. juanm) - *NO* private support
Hacked?
With so many beautiful colors in the world it’s a shame to make everything black and white - Dennis R. Little
my links: tips&stuff :: stuff only

gogo1
Registered User
Posts: 47
Joined: Mon Jul 31, 2006 11:21 pm
Location: Israel
Contact:

remove

Post by gogo1 » Wed Sep 13, 2006 11:35 am

problem solved. dont mind this post.

sorry.

ESQARE
Translator
Posts: 180
Joined: Fri Aug 08, 2003 9:49 pm
Location: Turkey
Contact:

Re: 2.0.19 How to block Private Messages only for a one user

Post by ESQARE » Fri Oct 13, 2006 5:23 am

Eric Cartman wrote: I tried the code below but it didnt work well. Although it says 'The boss does NOT want to be disturbed' after sending a pm, the person can still receive pm's. Is there any other easy way like this to block private messages only for one user?
Thanks in advance.

Eric

OPEN privmsg.php

FIND

Code: Select all

 
         if ( $to_userdata['user_notify_pm'] && !empty($to_userdata['user_email']) && $to_userdata['user_active'] ) 


BEFORE, ADD

Code: Select all

 
            if ( $to_userdata['user_id'] == '3') 
            { 
              message_die(GENERAL_MESSAGE, 'The boss does NOT want to be disturbed');        
            }   



Try this:

OPEN privmsg.php

FIND

Code: Select all

		$privmsg_subject = trim(htmlspecialchars($HTTP_POST_VARS['subject']));
		if ( empty($privmsg_subject) )
		{
			$error = TRUE;
			$error_msg .= ( ( !empty($error_msg) ) ? '<br />' : '' ) . $lang['Empty_subject'];
		}

AFTER, ADD

Code: Select all

            if ( $to_userdata['user_id'] == '3') 
            { 
              message_die(GENERAL_MESSAGE, 'The boss does NOT want to be disturbed');        
            }

Post Reply

Return to “[2.0.x] MOD Requests”