Extension:ShowRealUsernames

From MediaWiki.org
Jump to: navigation, search
MediaWiki extensions manualManual:Extensions
Crystal Clear action run.png
ShowRealUsernames

Release status:Extension status stable

ImplementationTemplate:Extension#type Special page
DescriptionTemplate:Extension#description Extends Special:ListUsers to also show each user's real name and/or other user-specific information.
Author(s)Template:Extension#username Paul Lustgarten, RV1971
Latest versionTemplate:Extension#version 1.3.0 (2014-08-25)
MediaWikiTemplate:Extension#mediawiki 1.20+
PHPTemplate:Extension#php 5.3+
LicenseTemplate:Extension#license GNU General Public License 3.0 or later
Download
Release Notes
ParametersTemplate:Extension#parameters
  • $wgShowRealUsernamesFields
  • $wgShowRealUsernamesInline
Added rightsTemplate:Extension#rights
  • showrealname
Hooks usedTemplate:Extension#hook
SpecialListusersQueryInfoManual:Hooks/SpecialListusersQueryInfo
SpecialListusersFormatRowManual:Hooks/SpecialListusersFormatRow

Translate the ShowRealUsernames extension if it is available at translatewiki.net

Check usage and version matrix.


The ShowRealUsernames extension extends the user listings produced by Special:ListUsers to include the registered real name of each user, displayed immediately following the wiki user name, and/or other user-specific information.

Installation[edit]

  • Download and place the file(s) in a directory called ShowRealUsernames in your extensions/ folder.
  • Add the following code at the bottom of your LocalSettings.php:
    require_once "$IP/extensions/ShowRealUsernames/ShowRealUsernames.php";
    
  • YesY Done - Navigate to Special:Version on your wiki to verify that the extension is successfully installed.

Even though this extension has been tested on MediaWiki 1.20–1.23 only, it is likely to work on slightly earlier versions as well.

Upgrading[edit]

To upgrade, simply install the new version at the place of the old one.

From versions before 1.2[edit]

Your existing configuration works as before, but you might like to take advantage of the new features.

Configuration[edit]

By default, the user's real name is appended to the wiki name in Special:ListUsers. You can replace the wiki name with the real name by setting

$wgShowRealUsernamesInline = true;

in your LocalSettings.php.

The fields retrieved from the database by the ShowRealUsernames extension are configured in $wgShowRealUsernamesFields, which currently defaults to 'user_real_name', 'user_name', 'user_email'. You can customize this in your LocalSettings.php.

The system messages sru-realname-inline and sru-realname-append are provided to format the name. Parameters ($1, $2, …) are replaced by the fields defined in $wgShowRealUsernamesFields in the order of definition.

Only users having the showrealname right do see the real names. By default, this right is granted to all registered users. To restrict it to a group add something like the following lines to your LocalSettings.php after including the ShowRealUsernames extension:

$wgGroupPermissions['user']['showrealname'] = false;

$wgGroupPermissions['bureaucrat']['showrealname'] = true;

Usage[edit]

This extension operates automatically whenever the Special:ListUsers page is displayed.

Release notes[edit]

These are the release notes for version 1.3.0. See Extension:ShowRealUsernames/History for older releases.

Configuration changes[edit]

See also[edit]