Index: openacs-4/packages/acs-subsite/www/register/email-confirm.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-subsite/www/register/email-confirm.adp,v diff -u -r1.7 -r1.8 --- openacs-4/packages/acs-subsite/www/register/email-confirm.adp 29 Aug 2003 12:25:45 -0000 1.7 +++ openacs-4/packages/acs-subsite/www/register/email-confirm.adp 3 Sep 2003 15:05:36 -0000 1.8 @@ -1,18 +1,17 @@ - #acs-subsite.Email_Confirmation# {#acs-subsite.Email_Confirmation#} - + #acs-subsite.lt_Your_email_is_confirm# - + #acs-subsite.lt_Your_email_has_been_c#

@export_vars;noquote@ - +

#acs-subsite.lt_Note_If_youve_forgott_1#.

Index: openacs-4/packages/acs-subsite/www/register/email-confirm.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-subsite/www/register/email-confirm.tcl,v diff -u -r1.4 -r1.5 --- openacs-4/packages/acs-subsite/www/register/email-confirm.tcl 7 Nov 2002 18:06:57 -0000 1.4 +++ openacs-4/packages/acs-subsite/www/register/email-confirm.tcl 3 Sep 2003 15:05:36 -0000 1.5 @@ -1,58 +1,22 @@ -# /www/register/email-confirm.tcl - ad_page_contract { @cvs-id $Id$ } { row_id:notnull,trim -} -properties { - site_link:onevalue - system_name:onevalue - export_vars:onevalue - user_id:onevalue - email:onevalue - email_verified_p:onevalue - member_state:onevalue + user_id } -# remove whitespace from rowid -# regsub -all "\[ \t\n]+" $rowid {} rowid +set token [auth::get_user_secret_token -user_id $user_id] -# we take authorized here in case the -# person responds more than once - -# we want to catch DB errors related to illegal rowids. -# but, we also have to make sure to get the rturn value from db_0or1row too. -set status [catch {set rowid_check [db_0or1row register_email_user_info_get { - select member_state, email, user_id, email_verified_p - from cc_users - where rowid = :row_id -}]}] - -if { $status != 0 || $rowid_check == 0} { - db_release_unused_handles +if { [string equal $token $row_id] } { ad_return_error "[_ acs-subsite.lt_Couldnt_find_your_rec]" "[_ acs-subsite.lt_Row_id_row_id_is_not_]" return -} - -set site_link [ad_site_home_link] -set system_name [ad_system_name] -set export_vars [export_form_vars email] +} -if {$email_verified_p == "f" && $member_state == "approved"} { - db_dml register_email_user_update "update users - set email_verified_p = 't' - where user_id = :user_id" +auth::confirm_email -user_id $user_id +acs_user::get -user_id $user_id -array user_info -} elseif { $member_state == "needs approval" && $email_verified_p == "f" } { - #state is need_email_verification_and_admin_approv - db_dml register_email_confirm_update3 "update users - set email_verified_p = 't' - where user_id = :user_id" - -} - -set email_verified_p "f" -set member_state "approved" - -ad_return_template +set export_vars [export_form_vars email] +set email $user_info(email) +set site_link [ad_site_home_link] +set system_name [ad_system_name] Index: openacs-4/packages/acs-subsite/www/register/recover-password.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-subsite/www/register/recover-password.tcl,v diff -u -r1.3 -r1.4 --- openacs-4/packages/acs-subsite/www/register/recover-password.tcl 3 Sep 2003 14:06:01 -0000 1.3 +++ openacs-4/packages/acs-subsite/www/register/recover-password.tcl 3 Sep 2003 15:05:36 -0000 1.4 @@ -17,16 +17,16 @@ set authority_options [auth::authority::get_authority_options] if { [llength $authority_options] > 1 } { - ad_form -name recover_password -edit_buttons [list [list [_ acs-subsite.Recover_Password_Button] ok]] -form { + ad_form -name recover_password -edit_buttons [list [list [_ acs-kernel.common_continue] ok]] -form { {authority_id:integer(select) {label "[_ acs-kernel.authentication_authority]"} {options $authority_options} {value $authority_id} } } } else { - ad_form -name recover_password -edit_buttons [list [list [_ acs-subsite.Recover_Password_Button] ok]] -form { - {authority_id:integer(hidden) + ad_form -name recover_password -edit_buttons [list [list [_ acs-kernel.common_continue] ok]] -form { + {authority_id:integer(hidden),optional {value $authority_id} } }