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.47.2.7 -r1.47.2.8
--- openacs-4/packages/acs-authentication/tcl/local-procs.tcl	19 Sep 2022 12:57:57 -0000	1.47.2.7
+++ openacs-4/packages/acs-authentication/tcl/local-procs.tcl	19 Sep 2022 13:24:22 -0000	1.47.2.8
@@ -508,31 +508,23 @@
 
     # LARS TODO: Move this out of the local driver and into the auth framework
     # Send password confirmation email to user
-    if { [set email_reg_confirm_p [parameter::get \
-                                       -parameter EmailRegistrationConfirmationToUserP \
-                                       -package_id $subsite_id -default 1]] != 0
-     } {
-        if { $generated_pwd_p
-             || [parameter::get \
-                     -parameter RegistrationProvidesRandomPasswordP \
-                     -package_id $subsite_id -default 0]
-             || $email_reg_confirm_p
-         } {
-            ad_try {
-                auth::password::email_password \
-                    -username $username \
-                    -authority_id $authority_id \
-                    -password $password \
-                    -from [parameter::get \
-                               -parameter NewRegistrationEmailAddress \
-                               -package_id $subsite_id \
-                               -default [ad_system_owner]] \
-                    -subject_msg_key "acs-subsite.email_subject_Registration_password" \
-                    -body_msg_key "acs-subsite.email_body_Registration_password"
-            } on error {errorMsg} {
-                # We don't fail hard here, just log an error
-                ad_log Error "Error sending registration confirmation to $email: $errorMsg"
-            }
+    if { [parameter::get \
+              -parameter EmailRegistrationConfirmationToUserP \
+              -package_id $subsite_id -default 1] } {
+        ad_try {
+            auth::password::email_password \
+                -username $username \
+                -authority_id $authority_id \
+                -password $password \
+                -from [parameter::get \
+                           -parameter NewRegistrationEmailAddress \
+                           -package_id $subsite_id \
+                           -default [ad_system_owner]] \
+                -subject_msg_key "acs-subsite.email_subject_Registration_password" \
+                -body_msg_key "acs-subsite.email_body_Registration_password"
+        } on error {errorMsg} {
+            # We don't fail hard here, just log an error
+            ad_log Error "Error sending registration confirmation to $email: $errorMsg"
         }
     }