It seems that badges are not applied when assigned by an process or modules such as the "Invite" module that changes the user's role(s).

Examples:
1) I have an 'invitee' badge, which is assigned when the user is given the role "invitee". If i manually give the user the role "invitee", the badge is assigned correctly. BUT - if a user is invited via the Invite module the account is created and given the role of "invitee", but no badge is assigned.

2) I have a "subscriber" badge and user-role. same as example #1 - if i assign the role manually, the badge is automatically assigned. BUT - if the role gets assigned by a (automated) PayPal payment via the LM_Paypal module, no badge is assigned.

Comments

heine’s picture

Status: Active » Closed (won't fix)

Please file the bugs against invite and lm_paypal. They do not use the appropriate hooks to notify other modules of the role change.

LeeMcL’s picture

Hi. I'm the author of LM_PayPal. You mention that I should be using "the appropriate hooks to notify other modules of the role change". I wasn't aware any such hooks existed. I've had a good look through the source for both Drupal-5 and Drupal-4.7 and cannot find what they are called. If you could let me know their names I'd be happy calls to them.

Lee

heine’s picture

By lack of anything better, hook_user or just use user_save.