Board Thread:Support Requests - Getting Technical/@comment-26565131-20160429171342/@comment-856287-20160429195407

DarrenPaul, that is not currently possible with a simple template: You must add a script that allows such a template to work in the first place. UltimateSupreme linked you to such a script. You (or an admin on the wiki) must install that script first. The instructions are there.

Once it is installed, you can make a template by following the instructions on that page: Typically, this will be added as a template such as Template:USERNAME, which mimics existing magic words when added to a page, e.g. USERNAME
 * Syntax

So go to Template:USERNAME on the wiki where you want this to work and add the code Then save the page.

If the script was installed properly on that wiki, and the template is okay, you should be able to place USERNAME anywhere and it will be replaced with the username of whoever is viewing it, or show nothing if the person is not logged in.