Issue #2075289 by srees: Fix for user_badges_user_save() function having no declared. This issue was in 6.x but also applies to 7.x