opencredit / BadgeOS-Community-Add-on

The "BadgeOS Community Add-on" integrates BadgeOS features into BuddyPress and bbPress. Site members complete achievements and earn badges based on a range of community activity and triggers. This add-on to BadgeOS also includes the ability to display badges and achievements on user profiles and activity feeds.
GNU Affero General Public License v3.0
11 stars 8 forks source link

BP User Activate hook not working properly. #5

Closed tw2113 closed 10 years ago

tw2113 commented 11 years ago

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.

tw2113 commented 11 years ago

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

tw2113 commented 10 years ago

Fixed in 5cc920361cf95ec