To insert user name into a document's header or footer, first invoke the Header and Footer dialog.

Then, focus an appropriate text box, depending on the required alignment, and click the User Name button.

When you click this button, the dialog adds an alias within square brackets at the current cursor position. You can surround this alias with any text you like. If you no longer need to display user name in your document, delete this alias.

Click OK to save changes and close the dialog.