From bab6c59d8ba74f2b7f9d7823d2c3344e7a069405 Mon Sep 17 00:00:00 2001 From: Brion Vibber Date: Thu, 30 Nov 2006 07:47:34 +0000 Subject: [PATCH] * Add AuthPluginSetup hook to override $wgAuth after configuration --- RELEASE-NOTES | 2 ++ docs/hooks.txt | 4 ++++ includes/Setup.php | 2 ++ 3 files changed, 8 insertions(+) diff --git a/RELEASE-NOTES b/RELEASE-NOTES index a2031dfc83..3b514c1298 100644 --- a/RELEASE-NOTES +++ b/RELEASE-NOTES @@ -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 == diff --git a/docs/hooks.txt b/docs/hooks.txt index c7f900c7ba..445b2a45ed 100644 --- a/docs/hooks.txt +++ b/docs/hooks.txt @@ -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 diff --git a/includes/Setup.php b/includes/Setup.php index 8fe9ef71ac..e143395745 100644 --- a/includes/Setup.php +++ b/includes/Setup.php @@ -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' ); -- 2.20.1