Manual:$wgAutocreatePolicy

Details
When should we automatically create local accounts when external accounts already exist, if using ExternalAuth? Can have three values: 'never', 'login', 'view'. 'view' requires the external database to support cookies, and implies 'login'.