Our moderators are an anonymous group to all normal registered users. This causes a problem with post history as the moderators have to log out as themselves and log back in as a user called "Moderator".

To overcome this in v3.8.5 I changed the posthistory and posthistory_listbit templates by simply removing the username field.

What I would like to do in v4 is some form of conditional that if the user that moderates the post is a member of the Moderator Usergroup to just show "Moderator" as the username to normal registered users but show the proper username to usergroups Admins, Super Moderators and Moderators so we know which moderator changed the post.

Has anyone done this type of thing before or can advise the best way about doing this, thanks