use StatusValue;
use User;
use WebRequest;
+use Wikimedia\ObjectFactory;
/**
* This serves as the entry point to the authentication system.
$state['userid'] = $user->getId();
// Update user count
- \DeferredUpdates::addUpdate( new \SiteStatsUpdate( 0, 0, 0, 0, 1 ) );
+ \DeferredUpdates::addUpdate( \SiteStatsUpdate::factory( [ 'users' => 1 ] ) );
// Watch user's userpage and talk page
$user->addWatch( $user->getUserPage(), User::IGNORE_USER_RIGHTS );
$user->saveSettings();
// Update user count
- \DeferredUpdates::addUpdate( new \SiteStatsUpdate( 0, 0, 0, 0, 1 ) );
+ \DeferredUpdates::addUpdate( \SiteStatsUpdate::factory( [ 'users' => 1 ] ) );
// Watch user's userpage and talk page
\DeferredUpdates::addCallableUpdate( function () use ( $user ) {
$user->addWatch( $user->getUserPage(), User::IGNORE_USER_RIGHTS );
$ret = [];
foreach ( $specs as $spec ) {
- $provider = \ObjectFactory::getObjectFromSpec( $spec );
+ $provider = ObjectFactory::getObjectFromSpec( $spec );
if ( !$provider instanceof $class ) {
throw new \RuntimeException(
"Expected instance of $class, got " . get_class( $provider )