I found your thread and thought you guys may have a similar issue as I’m having as it relates to buddypress and registration. Was wondering if you are encountering this:
bbPress (2.5.3) seems to completely ignore what the user had originally set as their password on my registration page from the very beginning of registration.
More detailed explanation:
On the registration page, the user chooses their own password, and then once approved, the user is then sent an automated registration message which then assigns the user a new random password. The user then has to log in using this random password and reset the password.
Where exactly did you add the code int the php file? I tried adding it to the very bottom of the file but that resulted in that code appearing as text at the top of my site.