getUserGroupManager() ->getUserAutopromoteGroups( $user ); } /** * Get the groups for the given user based on the given criteria. * * Does not return groups the user already belongs to or has once belonged. * * * @param User $user The user to get the groups for * @param string $event Key in $wgAutopromoteOnce (each one has groups/criteria) * * @return array Groups the user should be promoted to. * * @see $wgAutopromoteOnce * * @deprecated since 1.35. Use UserGroupManager::getUserAutopromoteOnceGroups. */ public static function getAutopromoteOnceGroups( User $user, $event ) { return MediaWikiServices::getInstance() ->getUserGroupManager() ->getUserAutopromoteOnceGroups( $user, $event ); } }