You are here

function user_update_7008 in Drupal 7

If 'user_register' variable was unset in Drupal 6, set it to be the same as the Drupal 6 default setting.

Related topics

File

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

Code

function user_update_7008() {
  if (!isset($GLOBALS['conf']['user_register'])) {

    // Set to the Drupal 6 default, "visitors can create accounts".
    variable_set('user_register', USER_REGISTER_VISITORS);
  }
}