GrowthExperiments currently does this in onLocalUserCreated():
$enablePercentage = $this->config->get( 'GEHomepageNewAccountEnablePercentage' ); if ( rand( 0, 99 ) < $enablePercentage ) { $this->userOptionsManager->setOption( $user, self::HOMEPAGE_PREF_ENABLE, 1 ); $this->userOptionsManager->setOption( $user, self::HOMEPAGE_PREF_PT_LINK, 1 ); // [...] }
At least some of those calls can be replaced with an appropriate conditional defaults configuration. In order to do our part with T54777: user_properties table bloat, we should move to conditional defaults for this need.