mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/ConfirmEdit
synced 2024-11-23 15:56:50 +00:00
Avoid using User ::getCanonicalName
Remove using of User::getCanonicalName since this method will be hard-deprecated. Now it is soft-deprecated Bug: T275030 Change-Id: Ic11a4259271c8941225882ddce64b53d44280409
This commit is contained in:
parent
a766d2e94f
commit
3f46a9b5c1
|
@ -5,6 +5,7 @@ use MediaWiki\MediaWikiServices;
|
|||
use MediaWiki\Revision\RevisionAccessException;
|
||||
use MediaWiki\Revision\RevisionLookup;
|
||||
use MediaWiki\Revision\SlotRecord;
|
||||
use MediaWiki\User\UserNameUtils;
|
||||
use Wikimedia\IPUtils;
|
||||
|
||||
/**
|
||||
|
@ -472,7 +473,8 @@ class SimpleCaptcha {
|
|||
* @return string
|
||||
*/
|
||||
private function badLoginPerUserKey( $username, BagOStuff $cache ) {
|
||||
$username = User::getCanonicalName( $username, 'usable' ) ?: $username;
|
||||
$userNameUtils = MediaWikiServices::getInstance()->getUserNameUtils();
|
||||
$username = $userNameUtils->getCanonical( $username, UserNameUtils::RIGOR_USABLE ) ?: $username;
|
||||
|
||||
return $cache->makeGlobalKey(
|
||||
'captcha', 'badlogin', 'user', md5( $username )
|
||||
|
|
Loading…
Reference in a new issue