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

Release status: stable

Implementation Ajax
Description Allows users to log in through an AJAX pop-up box
Author(s) Inez Korczyński
Jack Phoenix
Ryan Schmidt
Latest version 2.3 (2014-06-18)
MediaWiki 1.23+
License GNU General Public License 2.0 or later


Hooks used

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

Check usage and version matrix; code metrics

AjaxLogin extension allows users to log in through an AJAX pop-up box. Instead of being taken to Special:UserLogin when they click "Log in / Register", an AJAX pop-up box will be presented to them.


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


The $wgEnableAjaxLogin controls whether AjaxLogin is enabled for the current skin or not. By default, AjaxLogin is enabled for all core MediaWiki skins (Cologne Blue, Modern, Monobook and Vector).

If you have multiple custom skins for which you'd want to enable AjaxLogin, you could add something like this to your wiki's LocalSettings.php, after the extension's require_once:

// Array of skins for which AjaxLogin is enabled.
// Key is: 'skinname' => (true or false)
$wgEnableAjaxLogin = array_merge( $wgEnableAjaxLogin, array(
	'customskin' => true,
	'anothercustomskin' => true
) );
If you want to enable AjaxLogin for a custom skin, you might need to change the AjaxLogin.js file if your skin uses non-standard classes/IDs for the "Log in" link.