1.20.x user.install user_update_1015()

Change label 'Name' to 'Username' for clarity on user admin view.

Related topics

File

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

Code

function user_update_1015() {
  $config = config('views.view.user_admin');
  if ($config->get('display.default.display_options.filters.name.expose.label') == 'Name') {
    $config->set('display.default.display_options.filters.name.expose.label', 'Username');
  }
  if ($config->get('display.default.display_options.filters.name.expose.identifier') == 'name') {
    $config->set('display.default.display_options.filters.name.expose.identifier', 'username');
  }
  $config->save();
}