Index: openacs-4/packages/dotlrn/tcl/dotlrn-security-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn/tcl/dotlrn-security-procs.tcl,v diff -u -r1.54.2.1.4.1 -r1.54.2.1.4.2 --- openacs-4/packages/dotlrn/tcl/dotlrn-security-procs.tcl 29 Jun 2004 19:34:48 -0000 1.54.2.1.4.1 +++ openacs-4/packages/dotlrn/tcl/dotlrn-security-procs.tcl 21 Jul 2004 21:31:01 -0000 1.54.2.1.4.2 @@ -105,16 +105,18 @@ ns_set put $extra_vars user_id $user_id ns_set put $extra_vars id $id - set portal_id [dotlrn::get_portal_id_from_type -type user] + set template_id [dotlrn::get_portal_id_from_type -type user] + set portal_id [portal::create \ + -template_id $template_id \ + -name "[_ dotlrn.lt_Your_dotLRN_Workspace]" \ + $user_id] + db_transaction { set_can_browse -user_id $user_id -can_browse\=$can_browse_p - # The user will start with a the default portal. - # A new one will be created when they go to configure + ns_set put $extra_vars portal_id $portal_id - ns_set put $extra_vars portal_id $portal_id - # Add the relation (no need to feed in anything for object_id_one, # or two for that matter). set rel_id [relation_add \ @@ -124,7 +126,7 @@ "" \ $user_id \ ] - + dotlrn_applet::dispatch -op AddUser -list_args [list $user_id] # if the user is a member of communities (from some previous Index: openacs-4/packages/dotlrn/www/configure.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn/www/configure.tcl,v diff -u -r1.18.6.1 -r1.18.6.2 --- openacs-4/packages/dotlrn/www/configure.tcl 29 Jun 2004 19:34:48 -0000 1.18.6.1 +++ openacs-4/packages/dotlrn/www/configure.tcl 21 Jul 2004 21:32:36 -0000 1.18.6.2 @@ -56,34 +56,6 @@ set portal_id [dotlrn::get_portal_id -user_id $user_id] - # check if the portal_id is the default_portal_id - - set default_portal_p [db_string default_portal_p { - select count(*) from dotlrn_portal_types_map where portal_id = :portal_id - }] - - - if {$default_portal_p == 1} { - # user is set as the default portal - # give the user their own portal - - - set portal_id [portal::create \ - -template_id $portal_id \ - -name "[_ dotlrn.lt_Your_dotLRN_Workspace]" \ - $user_id] - - db_exec_plsql update_user_portal_id { - update dotlrn_user_profile_rels set portal_id = :portal_id - where dotlrn_user_profile_rels.rel_id = - (select rel_id from acs_rels, dotlrn_user_types - where acs_rels.object_id_two = :user_id - and acs_rels.object_id_one = dotlrn_user_types.group_id) - } - - util_memoize_flush "dotlrn::get_portal_id_not_cached -user_id $user_id" - } - set name [portal::get_name $portal_id] set rendered_page [portal::configure -allow_theme_change_p 0 $portal_id "index"]