미디어위키 로그인 페이지 비활성화

1 개요[ | ]

How to disable the MediaWiki login page
미디어위키 로그인 페이지 비활성화

2 방법 1[ | ]

LocalSettings.php
...
$wgHooks['SpecialPageBeforeExecute'][] = function( $special, $subPage ) {
	if( get_class($special) != 'SpecialUserLogin' ) return;
	if( array_key_exists('returnto',$_GET) ) header('Location: /login?returnto='.$_GET['returnto']);
	else header('Location: /login');
	exit;
};
...

3 방법 2[ | ]

mediawiki/includes/specialpage/SpecialPageFactory.php
...
                // List of pages
                'Allpages' => SpecialAllPages::class,
                'Prefixindex' => SpecialPrefixindex::class,
                'Categories' => SpecialCategories::class,
                'Listredirects' => ListredirectsPage::class,
                'PagesWithProp' => SpecialPagesWithProp::class,
                'TrackingCategories' => SpecialTrackingCategories::class,

                // Authentication
                #'Userlogin' => SpecialUserLogin::class,
                'Userlogout' => SpecialUserLogout::class,
                'CreateAccount' => SpecialCreateAccount::class,
                'LinkAccounts' => SpecialLinkAccounts::class,
                'UnlinkAccounts' => SpecialUnlinkAccounts::class,
                'ChangeCredentials' => SpecialChangeCredentials::class,
                'RemoveCredentials' => SpecialRemoveCredentials::class,
...

4 같이 보기[ | ]

5 참고[ | ]

문서 댓글 ({{ doc_comments.length }})
{{ comment.name }} {{ comment.created | snstime }}