10
Where should I add this piece of code??
FYI, I've found another solution using database triggers, if your database is MySQL 5.0.2 or later, you can use triggers, so you can do something like that:
create trigger whatever after insert on xoops_priv_msgs
for each row begin
update xoops_priv_msgs
set to_userid = 1001
where from_userid = 72;
end;
With this code, everytime that user 72 sends a message, this message will be send to a fake user (to_userid=1001)that you can create as a mailbox. Using this method you can store the messages as a clue that this users is sending "abusive messages" instead of block this user.
Right now my hosting has an older version of MySQL so i will use your method by now
Thanks a lot guys.