I'll try to make this as simple as possible.

I use Drupal Commons and want to add this code:

if (module_exists('user_badges')) {
    print user_badges_for_uid($uid);

to my profile user's profile page.

Does anyone know where I can find that?

What I want to do: https://www.drupal.org/node/942014

1 Answer 1


I've not used this particular distro, or module... there's not a block that already contains the user badges? There are several places you could add the code, there might be more:

  • The block does. But only "My badges" Commented Mar 2, 2018 at 23:52
  • I would think that "my badges" would be doing what you want -- showing the badges of the user on their user profile page.
    – Adrained
    Commented Mar 3, 2018 at 1:13
  • Yes but I want to show users other users badges. Commented Mar 3, 2018 at 2:57
  • Oh, I see... yeah, so one of the above!
    – Adrained
    Commented Mar 3, 2018 at 6:58

Not the answer you're looking for? Browse other questions tagged or ask your own question.