I did what you mentioned but the code in bp-custom.php is now showing up at the top of the page visible to all. Maybe I missed something else?
edit: ooops, my mistake. It’s working now but I can PM by going direct URL.
edit2: how to enable so admin can still PM w/o being friends?