diff --git a/modules/system/system.install b/modules/system/system.install index ba6a4a3..2fa642e 100644 --- a/modules/system/system.install +++ b/modules/system/system.install @@ -3090,10 +3090,15 @@ function system_update_7077() { } /** - * Set the {sessions}.uid field default value to 0, making possible a schema - * change for the {sessions} table for future Drupal 8 migration. + * Change the {sessions}.uid default value to 0. */ -function system_update_7074() { +function system_update_7078() { + global $user; + if ($user->uid) { + db_delete('sessions') + ->condition('uid', $user->uid, '<>') + ->execute(); + } db_change_field('sessions', 'uid', 'uid', array( 'description' => 'The {users}.uid corresponding to a session, or 0 for anonymous user.', 'type' => 'int',