You are here

function email_registration_update_8100 in Email Registration 8

Add an option to log in with the username as well as the email address.

File

./email_registration.install, line 30
Update and installation requirement hooks for the Email Registration module.

Code

function email_registration_update_8100() {
  $config_factory = \Drupal::configFactory();
  $email_registration = $config_factory
    ->getEditable('email_registration.settings');
  $email_registration
    ->set('login_with_username', FALSE);
  $email_registration
    ->save();
}