This modules works just perfectly for me, for which I am so thankful for its creators and maintainers, except one small problem. Userpoints module has been integrated with user_badges module and can automatically promote users to new roles upon their gaining certain thresholds set in userpoints' settings.
This tandem of two modules would be just perfect if not a problem with showing new badges for the users promoted to new roles. It does not show until you go to such a user's account page 1) uncheck new role (demote user from a new role), 2) save, 3) go into account editing page again and manually check new role again and save. I guess saving the user's account trigers something, some kind of record to database, which was missed by userpoints' module when it was promoting the user to a new role. I am not sure which exact module between the two this problem belongs to. So I am creating this issue for both modules.
Comments
Comment #1
heine commentedAs userpoints_role doesn't inform any other module of the role change, there's nothing we can do. Best to file a feature request against user_points.
Comment #2
yngens commentedI have just created an issue with userpoints module too (http://drupal.org/node/161825) with the following additional comment:
correct me if i am wrong. thnx
Comment #3
yngens commentedHeine sorry, I missed you post, bkz we were at the same time. Thank you. I will follow my ticket in userpoints module.
Comment #4
heine commentedIMO the best thing user_points can do is to invoke user_hooks, so other modules can respond to the role change.
Comment #5
andrewtf commentedI'm having a similar problem, although I found that I could make the badges appear by going into the admin area for the User Badges module, selecting the roles tab and clicking the "save roles" button, without making any changes. The appropriate badges are now assigned to the users who earned them via the User Points module. Is this a problem with User Points or User Badges?-
Comment #6
yngens commentedandrewtf, but you have to do it every time new user enters any role. this should be done automatically.
whose problem is this? well, first i believed it is an issue for user_badges module, but Heine explained that actually user_points module needs to invoke user_hooks, so other modules could respond to to the role changes. I opened an issue page in user_points module http://drupal.org/node/161825, however the module's maintainers do not seem like to react to this issue.
Comment #7
andrewtf commentedOK, I think I understand, then. So if I as a site admin put a user in a role with an assigned badge then there would be no problem. But if it's another module changing or adding a role for the user it has no way to communicate with the module assigning the badges--it's dealing with the user role only. I got a little confused after I was able to update the badges by saving the User Badges settings, but it all makes sense now.
Comment #8
flaviovs commentedI've submitted a patch to make fix this problem: http://drupal.org/node/187632