<?php
-
-use MediaWiki\MediaWikiServices;
-
/**
* Maintenance script to wrap all old-style passwords in a layered type
*
* @file
* @ingroup Maintenance
*/
+
require_once __DIR__ . '/Maintenance.php';
+use MediaWiki\MediaWikiServices;
+
/**
* Maintenance script to wrap all passwords of a certain type in a specified layered
* type that wraps around the old type.
}
public function execute() {
- $passwordFactory = new PasswordFactory();
- $passwordFactory->init( RequestContext::getMain()->getConfig() );
+ $passwordFactory = MediaWikiServices::getInstance()->getPasswordFactory();
$typeInfo = $passwordFactory->getTypes();
$layeredType = $this->getOption( 'type' );
// Clear memcached so old passwords are wiped out
foreach ( $updateUsers as $user ) {
- $user->clearSharedCache();
+ $user->clearSharedCache( 'refresh' );
}
} while ( $res->numRows() );
}