Gergő Tisza has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/293783

Change subject: Improve provider's canCreateAccount logic
......................................................................

Improve provider's canCreateAccount logic

Test non-autocreations; assume the user would override.

Change-Id: I18d40d95ffcb1aadd724efb3181a7cb32b803ff4
(cherry picked from commit a3ecb237b5957c5079c54a074672b76b02dfe3ab)
---
M TitleBlacklistPreAuthenticationProvider.php
1 file changed, 4 insertions(+), 3 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/TitleBlacklist 
refs/changes/83/293783/1

diff --git a/TitleBlacklistPreAuthenticationProvider.php 
b/TitleBlacklistPreAuthenticationProvider.php
index 9d33408..19bd3c2 100644
--- a/TitleBlacklistPreAuthenticationProvider.php
+++ b/TitleBlacklistPreAuthenticationProvider.php
@@ -39,9 +39,10 @@
 
        public function testUserForCreation( $user, $autocreate ) {
                $sv = StatusValue::newGood();
-               // only check autocreation here, testForAccountCreation will 
catch the rest
-               if ( $autocreate && $this->blockAutoAccountCreation ) {
-                       $sv->merge( TitleBlacklistHooks::testUserName( 
$user->getName(), $user, false, true ) );
+               $creator = RequestContext::getMain()->getUser();
+
+               if ( !$autocreate || $this->blockAutoAccountCreation ) {
+                       $sv->merge( TitleBlacklistHooks::testUserName( 
$user->getName(), $creator, true, true ) );
                }
                return $sv;
        }

-- 
To view, visit https://gerrit.wikimedia.org/r/293783
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I18d40d95ffcb1aadd724efb3181a7cb32b803ff4
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/TitleBlacklist
Gerrit-Branch: REL1_27
Gerrit-Owner: Gergő Tisza <gti...@wikimedia.org>

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to