Index: openacs-4/packages/acs-authentication/tcl/local-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-authentication/tcl/local-procs.tcl,v diff -u -r1.29.2.2 -r1.29.2.3 --- openacs-4/packages/acs-authentication/tcl/local-procs.tcl 8 Jun 2005 21:46:40 -0000 1.29.2.2 +++ openacs-4/packages/acs-authentication/tcl/local-procs.tcl 2 Oct 2005 19:30:07 -0000 1.29.2.3 @@ -485,22 +485,24 @@ # LARS TODO: Move this out of the local driver and into the auth framework # Send password confirmation email to user - if { $generated_pwd_p || \ - [parameter::get -parameter RegistrationProvidesRandomPasswordP -package_id [ad_conn subsite_id] -default 0] || \ - [parameter::get -parameter EmailRegistrationConfirmationToUserP -package_id [ad_conn subsite_id] -default 0] } { + if { [set email_reg_confirm_p [parameter::get -parameter EmailRegistrationConfirmationToUserP -package_id [ad_conn subsite_id] -default 0]] != -1 } { + if { $generated_pwd_p || \ + [parameter::get -parameter RegistrationProvidesRandomPasswordP -package_id [ad_conn subsite_id] -default 0] || \ + $email_reg_confirm_p } { - with_catch errmsg { - auth::password::email_password \ - -username $username \ - -authority_id $authority_id \ - -password $password \ - -from [parameter::get -parameter NewRegistrationEmailAddress -package_id [ad_conn subsite_id] -default [ad_system_owner]] \ - -subject_msg_key "acs-subsite.email_subject_Registration_password" \ - -body_msg_key "acs-subsite.email_body_Registration_password" - } { - # We don't fail hard here, just log an error - global errorInfo - ns_log Error "Error sending registration confirmation to $email.\n$errorInfo" + with_catch errmsg { + auth::password::email_password \ + -username $username \ + -authority_id $authority_id \ + -password $password \ + -from [parameter::get -parameter NewRegistrationEmailAddress -package_id [ad_conn subsite_id] -default [ad_system_owner]] \ + -subject_msg_key "acs-subsite.email_subject_Registration_password" \ + -body_msg_key "acs-subsite.email_body_Registration_password" + } { + # We don't fail hard here, just log an error + global errorInfo + ns_log Error "Error sending registration confirmation to $email.\n$errorInfo" + } } }