The Arcive of vBulletin Modifications Site. |
|
|
#1
|
|||
|
|||
|
Hi,
I want to disable receiving PMs to some members who have specific values in some users fields But I can't find the right variables to do that, can any one help me ? Thank you. |
|
#2
|
|||
|
|||
|
You could do something like this: create a plugin using hook pmdata_presave and code like:
PHP Code:
|
|
#3
|
|||
|
|||
|
Thanks a lot it works, but I have just a little problem, when I do an If condition on both user's fields (the sender & the reciever) it doesn't work
like PHP Code:
|
|
#4
|
|||
|
|||
|
You should probably do something like this:
Code:
$fromuserid = intval($this->fetch_field('fromuserid'));
$fromuser = fetch_userinfo($fromuserid);
if(is_array($fromuser) AND $fromuser['field1']=="XX"){
// etc
I'm pretty sure the $fromuser will always be equivalent to $vbulletin->userinfo, but the rest of the pm datamanager code is written without making that assumption, so it's probably best to stay with that. |
![]() |
|
|
| X vBulletin 3.8.12 by vBS Debug Information | |
|---|---|
|
|
More Information |
|
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|