Template:Username/doc

From K6ka's Wiki
Jump to navigation Jump to search

Displays the username of the user viewing the page. To use it, simply add {{Username}} anywhere on the desired page.

If the user is not logged in, then the template will display <You are not logged in. If you were logged in, this field would show your username>. You can control this by adding a parameter to the template with a value of the default text. For example, {{Username|person}} outputs "person" if the user is not logged in.

The JS for this template can be found at MediaWiki:Common.js

Use this template sparingly. Do not use it to threaten or attack other users. For example, "<You are not logged in. If you were logged in, this field would show your username> is an idiot" is unacceptable.