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:
if($vbulletin->userinfo['field1']=="XX"){
foreach ($this->info['recipients'] as $u){
$user = fetch_userinfo($u['userid']); // Note: need to do this because $this->info['recipients'] does not contain profile fields
if ($user['field1']=="YY")
{
$this->errors[] = "Can't send PM to user " . $user['username'];
}
}
}