Index: openacs-4/packages/dotlrn/sql/postgresql/users-package-create.sql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn/sql/postgresql/users-package-create.sql,v
diff -u -r1.1 -r1.2
--- openacs-4/packages/dotlrn/sql/postgresql/users-package-create.sql	8 Jul 2002 21:04:16 -0000	1.1
+++ openacs-4/packages/dotlrn/sql/postgresql/users-package-create.sql	12 Jul 2002 21:26:48 -0000	1.2
@@ -26,16 +26,18 @@
 select define_function_args ('dotlrn_user_profile_rel__delete','rel_id');
 
 
-create function dotlrn_user_profile_rel__new(integer,varchar,varchar,integer,integer,integer,varchar)
+create function dotlrn_user_profile_rel__new(integer,integer,integer,integer,varchar,varchar,integer,integer,varchar)
 returns integer as '
 DECLARE
         p_rel_id                alias for $1;
-        p_id                        alias for $2;
-        p_rel_type                alias for $3;
-        p_group_id                alias for $4;
-        p_user_id                alias for $5;
-        p_creation_user                alias for $6;
-        p_creation_ip                alias for $7;
+        p_user_id               alias for $2;
+        p_portal_id             alias for $3;
+        p_theme_id              alias for $4;
+        p_id                    alias for $5;
+        p_rel_type              alias for $6;
+        p_group_id              alias for $7;
+        p_creation_user         alias for $8;
+        p_creation_ip           alias for $9;
         v_rel_id                user_profile_rels.rel_id%TYPE;
         v_group_id              groups.group_id%TYPE;
 BEGIN
@@ -61,9 +63,9 @@
 
         insert
         into dotlrn_user_profile_rels
-        (rel_id, id)
+        (rel_id, portal_id, theme_id, id)
         values
-        (v_rel_id, p_id);
+        (v_rel_id, p_portal_id, p_theme_id, p_id);
 
         return v_rel_id;
 END;
@@ -96,14 +98,14 @@
 returns integer as '
 DECLARE
         p_rel_id                alias for $1;
-        p_portal_id                alias for $2;
-        p_theme_id                alias for $3;
-        p_id                        alias for $4;
-        p_rel_type                alias for $5;
-        p_group_id                alias for $6;
-        p_user_id                alias for $7;
-        p_creation_user                alias for $8;
-        p_creation_ip                alias for $9;
+        p_portal_id             alias for $2;
+        p_theme_id              alias for $3;
+        p_id                    alias for $4;
+        p_rel_type              alias for $5;
+        p_group_id              alias for $6;
+        p_user_id               alias for $7;
+        p_creation_user         alias for $8;
+        p_creation_ip           alias for $9;
         v_rel_id                dotlrn_user_profile_rels.rel_id%TYPE;
         v_group_id              groups.group_id%TYPE;
 BEGIN
