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 -r1.15 -r1.16
--- openacs-4/packages/acs-subsite/lib/login.tcl 7 Oct 2003 13:00:45 -0000 1.15
+++ openacs-4/packages/acs-subsite/lib/login.tcl 16 Oct 2003 21:09:45 -0000 1.16
@@ -66,7 +66,7 @@
set forgotten_pwd_url [auth::password::get_forgotten_url -authority_id $authority_id -username $username -email $email]
-set register_url "[subsite::get_element -element url]register/user-new"
+set register_url [export_vars -base "[subsite::get_element -element url]register/user-new" { return_url }]
if { [string equal $authority_id [auth::get_register_authority]] || [auth::UseEmailForLoginP] } {
set register_url [export_vars -no_empty -base $register_url { username email }]
}
Index: openacs-4/packages/acs-subsite/lib/user-new.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/acs-subsite/lib/user-new.tcl,v
diff -u -r1.3 -r1.4
--- openacs-4/packages/acs-subsite/lib/user-new.tcl 10 Oct 2003 14:25:38 -0000 1.3
+++ openacs-4/packages/acs-subsite/lib/user-new.tcl 16 Oct 2003 21:09:45 -0000 1.4
@@ -5,14 +5,16 @@
# next_url - Any url to redirect to after the form has been submitted. The
# variables user_id, password, and account_messages will be added to the URL. Optional.
# email - Prepopulate the register form with given email. Optional.
+# return_url - URL to redirect to after creation, will not get any query vars added
# Set default parameter values
array set parameter_defaults {
self_register_p 1
next_url {}
+ return_url {}
}
foreach parameter [array names parameter_defaults] {
- if { [template::util::is_nil $parameter] } {
+ if { ![exists_and_not_null $parameter] } {
set $parameter $parameter_defaults($parameter)
}
}
@@ -31,7 +33,7 @@
# Pre-generate user_id for double-click protection
set user_id [db_nextval acs_object_id_seq]
-ad_form -name register -export {next_url user_id} -form [auth::get_registration_form_elements] -on_request {
+ad_form -name register -export {next_url user_id return_url} -form [auth::get_registration_form_elements] -on_request {
# Populate elements from local variables
} -on_submit {
@@ -89,7 +91,7 @@
ad_returnredirect [export_vars -base $next_url {user_id password {account_message $creation_info(account_message)}}]
ad_script_abort
- }
+ }
# User is registered and logged in
Index: openacs-4/packages/acs-subsite/www/register/user-new.adp
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/acs-subsite/www/register/user-new.adp,v
diff -u -r1.15 -r1.16
--- openacs-4/packages/acs-subsite/www/register/user-new.adp 7 Oct 2003 11:24:28 -0000 1.15
+++ openacs-4/packages/acs-subsite/www/register/user-new.adp 16 Oct 2003 21:09:45 -0000 1.16
@@ -3,4 +3,4 @@
{#acs-subsite.Register#}
register.email
-
+
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 -r1.16 -r1.17
--- openacs-4/packages/acs-subsite/www/register/user-new.tcl 7 Oct 2003 11:24:28 -0000 1.16
+++ openacs-4/packages/acs-subsite/www/register/user-new.tcl 16 Oct 2003 21:09:45 -0000 1.17
@@ -3,12 +3,6 @@
@cvs-id $Id$
} {
- username:optional
{email ""}
- first_names:optional
- last_name:optional
- password:optional
- url:optional
- secret_question:optional
- secret_answer:optional
+ {return_url ""}
}