Extension:GetUserName
From Linux Web Expert
GetUserName Release status: stable |
|
---|---|
Implementation | Variable |
Description | Allows the current user's name to be put in a page |
Author(s) | |
Latest version | 2.1 (2022-01-02) |
Compatibility policy | Snapshots releases along with MediaWiki. Master is not backward compatible. |
MediaWiki | 1.35+ |
License | GNU General Public License 2.0 |
Download | GitHub:
<translate> Note:</translate> README |
Quarterly downloads | Lua error in Module:Extension at line 172: bad argument #1 to 'inNamespace' (unrecognized namespace name 'skin'). |
Public wikis using | Lua error in Module:Extension at line 172: bad argument #1 to 'inNamespace' (unrecognized namespace name 'skin'). |
The GetUserName extension allows to obtain the current user's name from wgUser
and insert it on a page.
Usage
When {{#USERNAME:}}
is found in the page, it will replace it with the current user name.
The cache is invalidated for pages using this extension.
In the visual editor,
{{#USERNAME}}
will evaluate to your current IP address because session information is not preserved when Parsoid parses pages. This also mean template substitution does not work with this tag.Installation
- <translate> <tvar name=1>Download</tvar> and place the file(s) in a directory called <tvar name=name>
GetUserName
</tvar> in your <tvar name=ext>extensions/
</tvar> folder.</translate> - <translate> Add the following code at the bottom of your <tvar name=1>LocalSettings.php </tvar> file:</translate>
wfLoadExtension( 'GetUserName' );
- File:OOjs UI icon check-constructive.svg <translate> Done</translate> – <translate> Navigate to <tvar name=special>Special:Version</tvar> on your wiki to verify that the extension is successfully installed.</translate>
See also
Categories:
- Pages with script errors
- Pages with broken file links
- Stable extensions
- Extensions without an image
- Variable extensions
- Extensions with release branches compatibility policy
- Extensions with manual MediaWiki version
- GPL licensed extensions
- Extensions in GitHub version control
- ParserFirstCallInit extensions
- All extensions
- Extensions not in ExtensionJson