Requested Feature: Add a configuration variable (e.g. $wgOpenIDConnect_IgnorePreferredNameClaim) that would ignore the preferred username sent by the identity provider when formulating a username. This would enable using $wgOpenIDConnect_UseEmailNameAsUserName or $wgOpenIDConnect_UseRealNameAsUserName even if a preferred username is provided.
This functionality is actually available by setting the 'preferred_username' config variable to null or the empty string. However, that was throwing an exception, which is fixed by the attached patch.