Extension:GetUserName

What can this extension do?
This extension can obtain the current user's name from wgUser and insert it on a page.

Note: This extension also serves as an example of how to add a variable easily to the system.

Usage
When   is found in the page, it will replace it with the current user name. I wrote this because I wanted to make a link where the users could create draft documents easily, with unique names, in their user namespace. I added this to my page: Create a document "User:/Draft-"

Note that this extension isn't suitable for large wikis or long pages, because the cache is invalidated for pages using this extension (see Extension_talk:GetUserName page).

Download instructions
Please cut and paste the code found below and place it in. Note: $IP stands for the root directory of your MediaWiki installation, the same directory that holds LocalSettings.php.

Installation
To install this extension, add the following to LocalSettings.php:

Configuration parameters
None needed

User rights
None needed