opencredit/BadgeOS-Community-Add-on

BP User Activate hook not working properly.

Closed this issue · 2 comments

Based on the thread here, not much to go on:
http://wordpress.org/support/topic/badge-not-awarded-on-community-activity-activated-account?replies=2

Regardless, I was able to confirm that any badges tied to activating your BP account were not being properly triggered. I was able to narrow it down to the lack of user ID. The global wasn't working. I looked at the do_action() for bp_core_activated_user and it passes in the ID. However for the sake of keeping function amount down, we just loop over our hooks and invoke the same function without any parameters.

Not sure how we should handle this, unless we can find a global variable that is correct at the time of our add_action. Only other thought at the moment fetch the newest member from the user table at the time of the callback and use that for the ID.

If all involved could review b177a4f, that'd be awesome. Best solution I could come up with right now.

Fixed in 5cc9203