X-Git-Url: https://git.heureux-cyclage.org/?p=lhc%2Fweb%2Fwiklou.git;a=blobdiff_plain;f=includes%2Fspecials%2FSpecialCreateAccount.php;h=9b5dd3f4ba5e3c2bf52eaaca2ee5616e03583701;hp=73beafce0f5ece6a1e732256de2ca7c1d25de260;hb=1dd54d80af8403c0f36746f482a46ffb41fb28ed;hpb=7874fc4bec845ad92960b07e969c65f3c3fe74f2 diff --git a/includes/specials/SpecialCreateAccount.php b/includes/specials/SpecialCreateAccount.php index 73beafce0f..9b5dd3f4ba 100644 --- a/includes/specials/SpecialCreateAccount.php +++ b/includes/specials/SpecialCreateAccount.php @@ -23,6 +23,7 @@ use MediaWiki\Auth\AuthManager; use MediaWiki\Logger\LoggerFactory; +use MediaWiki\MediaWikiServices; /** * Implements Special:CreateAccount @@ -63,6 +64,10 @@ class SpecialCreateAccount extends LoginSignupSpecialPage { $user = $this->getUser(); $status = AuthManager::singleton()->checkAccountCreatePermissions( $user ); if ( !$status->isGood() ) { + // Track block with a cookie if it doesn't exist already + if ( $user->isBlockedFromCreateAccount() ) { + MediaWikiServices::getInstance()->getBlockManager()->trackBlockWithCookie( $user ); + } throw new ErrorPageError( 'createacct-error', $status->getMessage() ); } }