Index: openacs-4/packages/acs-kernel/sql/oracle/upgrade/upgrade-5.0d2-5.0d3.sql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/acs-kernel/sql/oracle/upgrade/upgrade-5.0d2-5.0d3.sql,v
diff -u -r1.6 -r1.7
--- openacs-4/packages/acs-kernel/sql/oracle/upgrade/upgrade-5.0d2-5.0d3.sql	30 Sep 2003 12:48:00 -0000	1.6
+++ openacs-4/packages/acs-kernel/sql/oracle/upgrade/upgrade-5.0d2-5.0d3.sql	1 Oct 2003 11:23:06 -0000	1.7
@@ -214,9 +214,13 @@
 
 -- set all current users' username to equal their email
 -- and their authority to be the local authority
+-- Exclude the unregistered visitor as he/she has a null email
 update users 
-set    username = (select email from parties where party_id = user_id),
-       authority_id = (select authority_id from auth_authorities where short_name = 'local');
+set    username = (select email 
+                   from parties 
+                   where party_id = user_id),
+       authority_id = (select authority_id from auth_authorities where short_name = 'local')
+where user_id <> 0;
 
 -- add a unique constraint
 alter table users add constraint users_authority_username_un unique (authority_id, username);
