How can I restrict access (to a role or an user) to Buddypress’ private messaging system? I was trying to use the current_user_can
WordPress function, but it requires the capability as the argument. The problem is that buddypress doesn’t make use of any sort of role. So, what would be the right way to do it?