$wgDebugLogFile = '';
}
-// Disable AuthManager API modules if $wgDisableAuthManager
-if ( $wgDisableAuthManager ) {
- $wgAPIModules += [
- 'clientlogin' => 'ApiDisabled',
- 'createaccount' => 'ApiCreateAccount', // Use the non-AuthManager version
- 'linkaccount' => 'ApiDisabled',
- 'unlinkaccount' => 'ApiDisabled',
- 'changeauthenticationdata' => 'ApiDisabled',
- 'removeauthenticationdata' => 'ApiDisabled',
- 'resetpassword' => 'ApiDisabled',
- ];
- $wgAPIMetaModules += [
- 'authmanagerinfo' => 'ApiQueryDisabled',
- ];
-}
-
// Backwards compatibility with old password limits
if ( $wgMinimalPasswordLength !== false ) {
$wgPasswordPolicy['policies']['default']['MinimalPasswordLength'] = $wgMinimalPasswordLength;
if ( is_null( $wgLocalTZoffset ) ) {
$wgLocalTZoffset = date( 'Z' ) / 60;
}
+// The part after the System| is ignored, but rest of MW fills it
+// out as the local offset.
+$wgDefaultUserOptions['timecorrection'] = "System|$wgLocalTZoffset";
if ( !$wgDBerrorLogTZ ) {
$wgDBerrorLogTZ = $wgLocaltimezone;
$wgRequest->interpolateTitle();
if ( !is_object( $wgAuth ) ) {
- $wgAuth = $wgDisableAuthManager ? new AuthPlugin : new MediaWiki\Auth\AuthManagerAuthPlugin;
+ $wgAuth = new MediaWiki\Auth\AuthManagerAuthPlugin;
Hooks::run( 'AuthPluginSetup', [ &$wgAuth ] );
}
-if ( !$wgDisableAuthManager &&
- $wgAuth && !$wgAuth instanceof MediaWiki\Auth\AuthManagerAuthPlugin
-) {
+if ( $wgAuth && !$wgAuth instanceof MediaWiki\Auth\AuthManagerAuthPlugin ) {
MediaWiki\Auth\AuthManager::singleton()->forcePrimaryAuthenticationProviders( [
new MediaWiki\Auth\TemporaryPasswordPrimaryAuthenticationProvider( [
'authoritative' => false,
$sessionUser = MediaWiki\Session\SessionManager::getGlobalSession()->getUser();
if ( $sessionUser->getId() === 0 && User::isValidUserName( $sessionUser->getName() ) ) {
$ps_autocreate = Profiler::instance()->scopedProfileIn( $fname . '-autocreate' );
- if ( $wgDisableAuthManager ) {
- $res = MediaWiki\Session\SessionManager::autoCreateUser( $sessionUser );
- } else {
- $res = MediaWiki\Auth\AuthManager::singleton()->autoCreateUser(
- $sessionUser,
- MediaWiki\Auth\AuthManager::AUTOCREATE_SOURCE_SESSION,
- true
- );
- }
+ $res = MediaWiki\Auth\AuthManager::singleton()->autoCreateUser(
+ $sessionUser,
+ MediaWiki\Auth\AuthManager::AUTOCREATE_SOURCE_SESSION,
+ true
+ );
Profiler::instance()->scopedProfileOut( $ps_autocreate );
- \MediaWiki\Logger\LoggerFactory::getInstance( 'authmanager' )->info( 'Autocreation attempt', [
+ \MediaWiki\Logger\LoggerFactory::getInstance( 'authevents' )->info( 'Autocreation attempt', [
'event' => 'autocreate',
'status' => $res,
] );
unset( $sessionUser );
}
+if ( !$wgCommandLineMode ) {
+ Pingback::schedulePingback();
+}
+
wfDebug( "Fully initialised\n" );
$wgFullyInitialised = true;