I use the Advanced forum and the Author pane modules.

I want to show the role the user has, as in the following screenshot.


I looked everywhere, but I have not found a real solution.

NB: I'm not a PHP expert.

  • 1
    Users often have multiple roles. Do you want to show all roles a user has or just one in the case a user has multiple roles? – Patrick Kenny Apr 23 '12 at 3:02

In advanced forum module edit advf-author-pane.tpl.php in your chosen forum theme and and below print $account_name; you'll need a similar line like print implode(', ', $account['roles'];. It should be wrapped in some HTML tag (span, p, ...) so you can style its display.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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