1.20.x user.install user_update_1010()

Set default option for login method to use accounts only.

Related topics

File

modules/user/user.install, line 1108
Install, update and uninstall functions for the user module.

Code

function user_update_1010() {
  $config = config('system.core');
  $config->set('user_login_method', 'username_only');
  $config->set('user_email_match', 1);
  $config->save();
}