Index: openacs-4/packages/acs-authentication/tcl/authentication-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-authentication/tcl/authentication-procs.tcl,v diff -u -N -r1.15 -r1.16 --- openacs-4/packages/acs-authentication/tcl/authentication-procs.tcl 4 Sep 2003 09:10:32 -0000 1.15 +++ openacs-4/packages/acs-authentication/tcl/authentication-procs.tcl 4 Sep 2003 09:20:54 -0000 1.16 @@ -208,6 +208,14 @@ ad_user_login -forever=$persistent_p $user_id } +ad_proc -private auth::get_register_authority { +} { + Get the ID of the authority in which accounts get created. +} { + # HACK while waiting for real account creation + return [auth::authority::local] +} + ad_proc -public auth::create_user { {-verify_password_confirm:boolean} {-user_id ""} @@ -252,8 +260,7 @@ be quoted. Guaranteed to be non-empty if account_status is not ok. } { - # HACK: Always create in local acconut - set authority_id [auth::authority::local] + set authority_id [auth::get_register_authority] # This holds element error messages array set element_messages [list] @@ -454,8 +461,7 @@ } { - # HACK: Only the local authority for now - set authority_id [auth::authority::local] + set authority_id [auth::get_register_authority] array set element_info [auth::registration::GetElements -authority_id $authority_id] Index: openacs-4/packages/acs-subsite/lib/login.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-subsite/lib/login.adp,v diff -u -N -r1.1 -r1.2 --- openacs-4/packages/acs-subsite/lib/login.adp 4 Sep 2003 07:50:51 -0000 1.1 +++ openacs-4/packages/acs-subsite/lib/login.adp 4 Sep 2003 09:20:53 -0000 1.2 @@ -4,4 +4,6 @@ Forgot your password?
-Register + + Register + Index: openacs-4/packages/acs-subsite/lib/login.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-subsite/lib/login.tcl,v diff -u -N -r1.2 -r1.3 --- openacs-4/packages/acs-subsite/lib/login.tcl 4 Sep 2003 08:14:55 -0000 1.2 +++ openacs-4/packages/acs-subsite/lib/login.tcl 4 Sep 2003 09:20:53 -0000 1.3 @@ -12,8 +12,8 @@ set subsite_id [subsite::get_element -element object_id] } -if { ![info exists authority_id] } { - set authority_id {} +if { ![exists_and_not_null authority_id] } { + set authority_id [auth::authority::local] } if { ![info exists username] } { @@ -56,6 +56,9 @@ set forgotten_pwd_url [auth::password::get_forgotten_url -authority_id $authority_id -username $username] set register_url "[subsite::get_element -element url]register/user-new" +if { [string equal $authority_id [auth::get_register_authority]] } { + set register_url [export_vars -no_empty -base $register_url { username }] +} ad_form -name login -html { style "margin: 0px;" } -show_required_p 0 -edit_buttons { { "Login" ok } } -form { {return_url:text(hidden)} Index: openacs-4/packages/acs-subsite/www/register/user-new.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-subsite/www/register/user-new.tcl,v diff -u -N -r1.9 -r1.10 --- openacs-4/packages/acs-subsite/www/register/user-new.tcl 4 Sep 2003 09:10:58 -0000 1.9 +++ openacs-4/packages/acs-subsite/www/register/user-new.tcl 4 Sep 2003 09:20:54 -0000 1.10 @@ -2,6 +2,15 @@ Page for users to register themselves on the site. @cvs-id $Id$ +} { + username:optional + email:optional + first_names:optional + last_name:optional + password:optional + url:optional + secret_question:optional + secret_answer:optional } # TODO: Move to includeable chunk @@ -11,7 +20,9 @@ ad_user_logout -ad_form -name register -form [auth::get_registration_form_elements] -on_submit { +ad_form -name register -form [auth::get_registration_form_elements] -on_request { + # Populate elements from local variables +} -on_submit { array set creation_info [auth::create_user \ -first_names $first_names \