From c54234d71a6f1a6857e74ffd1e76e5e0604833de Mon Sep 17 00:00:00 2001 From: Dries Buytaert Date: Thu, 8 Dec 2005 08:40:10 +0000 Subject: - Patch #40341 by Neil: fixed problems with database schema versions. - When user #1 creates an account (we can assume this happens only once), system.module's schema version is set to the latest availiable. - system_get_files_database() now includes a 'schema_version' child of each file object. - That new information is re-saved when Drupal re-populates the system table. - An array of newly-enabled modules is built, module_list() is reloaded, and the schema versions of each newly-enabled module are set to the most recent availiable. If the schema version is already set (presumably from a previous installation) it is not changed. --- modules/user/user.module | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'modules/user/user.module') diff --git a/modules/user/user.module b/modules/user/user.module index a85358eaf..4ade502e4 100644 --- a/modules/user/user.module +++ b/modules/user/user.module @@ -1123,6 +1123,11 @@ function user_register_submit($form_id, $form_values) { user_mail($mail, t('drupal user account details for %s', array('%s' => $name)), strtr(t("%username,\n\nYou may now login to %uri using the following username and password:\n\n username: %username\n password: %password\n\n%edit_uri\n\n--drupal"), $variables), "From: $from\nReply-to: $from\nX-Mailer: Drupal\nReturn-path: $from\nErrors-to: $from"); drupal_set_message(t('

Welcome to Drupal. You are user #1, which gives you full and immediate access. All future registrants will receive their passwords via e-mail, so please make sure your website e-mail address is set properly under the general settings on the settings page.

Your password is %pass. You may change your password below.

', array('%pass' => $pass, '%settings' => url('admin/settings')))); user_authenticate($account->name, trim($pass)); + + // Set the installed schema version of the system module to the most recent version. + include_once './includes/install.inc'; + drupal_set_installed_schema_version('system', max(drupal_get_schema_versions('system'))); + drupal_goto('user/1/edit'); } else { -- cgit v1.2.3