Index: openacs-4/packages/acs-kernel/sql/postgresql/acs-create.sql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/acs-kernel/sql/postgresql/acs-create.sql,v
diff -u -r1.13 -r1.14
--- openacs-4/packages/acs-kernel/sql/postgresql/acs-create.sql	17 Mar 2003 21:58:36 -0000	1.13
+++ openacs-4/packages/acs-kernel/sql/postgresql/acs-create.sql	17 May 2003 01:47:10 -0000	1.14
@@ -106,27 +106,30 @@
 create 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
+  from parties p, persons pe, users u, group_member_map m, membership_rels mr, acs_magic_objects amo
   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 m.group_id = acs__magic_object_id('registered_users')
+  and amo.name = 'registered_users'
+  and m.group_id = amo.object_id
   and mr.member_state = 'approved'
   and u.email_verified_p = 't';
 
 create 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
+from acs_objects o, parties pa, persons pe, users u, group_member_map m, membership_rels mr, acs_magic_objects amo
 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 m.group_id = acs__magic_object_id('registered_users')
-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 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;
 
+
 -----------------------------------
 -- Community Core Initialization --
 -----------------------------------
