* Add AuthPluginSetup hook to override $wgAuth after configuration
authorBrion Vibber <brion@users.mediawiki.org>
Thu, 30 Nov 2006 07:47:34 +0000 (07:47 +0000)
committerBrion Vibber <brion@users.mediawiki.org>
Thu, 30 Nov 2006 07:47:34 +0000 (07:47 +0000)
RELEASE-NOTES
docs/hooks.txt
includes/Setup.php

index a2031df..3b514c1 100644 (file)
@@ -227,6 +227,8 @@ it from source control: http://www.mediawiki.org/wiki/Download_from_SVN
 * (bug 6016) Left-aligned images should stack vertically, like right-aligned
   images, not horizontally.
 * Patch from LeonWP: added UploadForm:BeforeProcessing hook in SpecialUpload.php
+* Add AuthPluginSetup hook to override $wgAuth after configuration
+
 
 == Languages updated ==
 
index c7f900c..445b2a4 100644 (file)
@@ -286,6 +286,10 @@ $isminor: minor flag
 $iswatch: watch flag
 $section: section #
 
+'AuthPluginSetup': update or replace authentication plugin object ($wgAuth)
+Gives a chance for an extension to set it programattically to a variable class.
+&$auth: the $wgAuth object, probably a stub
+
 'AutoAuthenticate': called to authenticate users on external/environmental means
 $user: writes user object to this parameter
 
index 8fe9ef7..e143395 100644 (file)
@@ -160,7 +160,9 @@ foreach ( $wgSkinExtensionFunctions as $func ) {
 
 if( !is_object( $wgAuth ) ) {
        $wgAuth = new StubObject( 'wgAuth', 'AuthPlugin' );
+       wfRunHooks( 'AuthPluginSetup', array( &$wgAuth ) );
 }
+
 wfProfileOut( $fname.'-User' );
 
 wfProfileIn( $fname.'-misc2' );