purge_friends function lacks global variables

`purge_friends()` needs `$phpbb_root_path` and usage of `$this` instead of `$socialnet`.