The easiest solution would probably be a new kind of replacement variable, like `{=+Username}`, instead of a pre-defined setting in the macro itself.
Upon submitting the post, check whether the user has permission to post as another user. If not, just remove that part from the post. If yes...