360c34a5c6
This extension works with MediaWiki instances setup behind HTTP authentication. It pulls usernames from $_SERVER['PHP_AUTH_USER']. The extension will then either log the user on to MediaWiki if the user name exists in the database or create a new user if it does not. "ok with me" jasper@, "yeah hell import it" landry@
12 lines
330 B
Plaintext
12 lines
330 B
Plaintext
edit LocalSettings.php and add:
|
|
|
|
if ((!empty($_SERVER['PHP_AUTH_USER']) &&
|
|
!empty($_SERVER['REMOTE_USER'])) ||
|
|
$_COOKIE['fpwiki_en_UserID']) {
|
|
|
|
require_once("$IP/extensions/HttpAuthPlugin.php");
|
|
$wgAuth = new HttpAuthPlugin();
|
|
$wgHooks['UserLoadFromSession'][] =
|
|
array($wgAuth,'autoAuthenticate');
|
|
}
|