Topic on Extension talk:ConfirmAccount

How to deny access to login-type-signup page or redirect to requestAccount page?

5
Monic abc (talkcontribs)

I added to LocalSettings.php code from Enhancements (https://www.mediawiki.org/wiki/Extension:ConfirmAccount).
So I don't have direct link to register page. But if I go to login -> I can see a button which is link to http://localhost/mediawiki/index.php?title=Special:Login&type=signup -> and on this page anonymous user can register himself, what I don't want. Does anyone have any idea, how to always redirect from this site to site with RequestAccount?

I have:
MediaWiki 1.23.0
PHP 5.3.28 (cgi-fcgi)
MySQL 5.5.40
Confirm User Accounts – (Version d7bd12d)

Nemo bis (talkcontribs)

By "site", do you mean "page"?

Monic abc (talkcontribs)

Yeah, sorry for my English. :P

Nemo bis (talkcontribs)

Well, some extensions do things like:

specials/SpecialTranslationStash.php
31-             if ( !$this->hasPermissionToUse() ) {
32-                     if ( $this->getUser()->isLoggedIn() ) {
33:                             $out->redirect(
34-                                     Title::newFromText( $wgTranslateSecondaryPermissionUrl )->getLocalUrl()
35-                             );

You could probably code your conditions and execute them via an appropriate hook.

However I'm not convinced this is really what you need: if "anonymous user can register himself" for real, you didn't configure your MediaWiki correctly. Pleae read the documentation again and check that you did as it says:

  • put the configuration in the correct order in your LocalSettings.php,
  • don't add $wgGroupPermissions['*']['createaccount'] = true; or similar.
Monic abc (talkcontribs)

Thanks for reply. ;)
1. Configuration in correct order? Which lines of code are important and their order can change something?
2. I only have these lines with word createaccount:

   $wgGroupPermissions['*']['createaccount'] = false;
   $wgGroupPermissions['sysop']['createaccount'] = false;
Reply to "How to deny access to login-type-signup page or redirect to requestAccount page?"