Index: openacs-4/packages/acs-kernel/sql/oracle/acs-create.sql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/acs-kernel/sql/oracle/acs-create.sql,v
diff -u -r1.8 -r1.9
--- openacs-4/packages/acs-kernel/sql/oracle/acs-create.sql	28 Aug 2003 09:41:38 -0000	1.8
+++ openacs-4/packages/acs-kernel/sql/oracle/acs-create.sql	30 Sep 2003 12:10:02 -0000	1.9
@@ -130,11 +130,11 @@
                     from acs_rels
                     where object_id_two = user_id) loop
 
-            acs_rel.delete(rel_id => row.rel_id);
+            acs_rel.del(rel_id => row.rel_id);
 
         end loop;
 
-        acs_user.delete(user_id => user_id);
+        acs_user.del(user_id => user_id);
     end;
 
     function magic_object_id (
@@ -160,30 +160,38 @@
 
 create or replace view registered_users
 as
-  select p.email, p.url, pe.first_names, pe.last_name, u.*, mr.member_state
-  from parties p, persons pe, users u, group_member_map m, membership_rels mr, acs_magic_objects amo
+  select p.email, p.url, pe.first_names, pe.last_name,
+  u.user_id,u.authority_id,u.username,u.password,u.salt,u.screen_name,u.priv_name,u.priv_email,u.email_verified_p,u.email_bouncing_p,u.no_alerts_until,u.last_visit,u.second_to_last_visit,u.n_sessions,u.password_question,u.password_answer,u.password_changed_date,
+  mr.member_state
+  from parties p, persons pe, users u, group_member_map m, membership_rels mr
   where party_id = person_id
   and person_id = user_id
   and u.user_id = m.member_id
   and m.rel_id = mr.rel_id
-  and amo.name = 'registered_users'
-  and m.group_id = amo.object_id
+  and m.group_id = (select acs.magic_object_id('registered_users') from dual)
   and mr.member_state = 'approved'
   and u.email_verified_p = 't';
 
+
 create or replace view cc_users
 as
-select o.*, pa.*, pe.*, u.*, mr.member_state, mr.rel_id
-from acs_objects o, parties pa, persons pe, users u, group_member_map m, membership_rels mr, acs_magic_objects amo
+select
+o.object_id,o.object_type,o.context_id,o.security_inherit_p,o.creation_user,o.creation_date,o.creation_ip,o.last_modified,o.modifying_user,o.modifying_ip,
+pa.party_id, pa.email, pa.url, 
+pe.person_id, pe.first_names, pe.last_name, 
+u.user_id,u.authority_id,username,u.password,u.salt,u.screen_name,u.priv_name,u.priv_email,u.email_verified_p,u.email_bouncing_p,u.no_alerts_until,u.last_visit,u.second_to_last_visit,u.n_sessions,u.password_question,u.password_answer,password_changed_date,
+mr.member_state, mr.rel_id
+from acs_objects o, parties pa, persons pe, users u, group_member_map m, membership_rels mr, acs_magic_objects mo
 where o.object_id = pa.party_id
-  and pa.party_id = pe.person_id
-  and pe.person_id = u.user_id
-  and u.user_id = m.member_id
-  and amo.name = 'registered_users'
-  and m.group_id = amo.object_id
-  and m.rel_id = mr.rel_id
-  and m.container_id = m.group_id;
+and pa.party_id = pe.person_id
+and pe.person_id = u.user_id
+and u.user_id = m.member_id
+and m.group_id = mo.object_id
+and mo.name = 'registered_users'
+and m.rel_id = mr.rel_id
+and m.container_id = m.group_id;
 
+
 -----------------------------------
 -- Community Core Initialization --
 -----------------------------------
