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.39 -r1.40 --- openacs-4/packages/acs-authentication/tcl/local-procs.tcl 16 Jun 2015 07:13:27 -0000 1.39 +++ openacs-4/packages/acs-authentication/tcl/local-procs.tcl 7 Aug 2017 23:47:46 -0000 1.40 @@ -123,7 +123,7 @@ # domain set new_email $new_username - set rel_id [db_string getrelid { *SQL* }] + set rel_id [db_string getrelid {}] membership_rel::change_state -rel_id $rel_id -state "merged" acs_user::update -user_id $from_user_id -username "$new_username" -screen_name "$new_username" @@ -278,8 +278,7 @@ if { [catch { ad_change_password $user_id $new_password } errmsg] } { set result(password_status) "change_error" - global errorInfo - ns_log Error "Error changing local password for username $username, user_id $user_id: \n$errorInfo" + ns_log Error "Error changing local password for username $username, user_id $user_id: \n$::errorInfo" return [array get result] } @@ -311,8 +310,7 @@ -subject $subject \ -body $body } { - global errorInfo - ns_log Error "Error sending out password changed notification to account owner with user_id $user(user_id), email $user(email): $errmsg\n$errorInfo" + ns_log Error "Error sending out password changed notification to account owner with user_id $user(user_id), email $user(email): $errmsg\n$::errorInfo" } } @@ -437,7 +435,7 @@ set result(required) username } - set result(required) [concat $result(required) { email first_names last_name }] + lappend result(required) email first_names last_name set result(optional) { url } if { ![parameter::get -package_id [ad_conn subsite_id] -parameter RegistrationProvidesRandomPasswordP -default 0] } { @@ -501,23 +499,30 @@ # 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 [ad_conn subsite_id] -default 1]] != 0 } { - if { $generated_pwd_p || \ - [parameter::get -parameter RegistrationProvidesRandomPasswordP -package_id [ad_conn subsite_id] -default 0] || \ - $email_reg_confirm_p } { - + if { [set email_reg_confirm_p [parameter::get \ + -parameter EmailRegistrationConfirmationToUserP \ + -package_id [ad_conn subsite_id] -default 1]] != 0 + } { + 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]] \ + -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" + ns_log Error "Error sending registration confirmation to $email.\n$::errorInfo" } } } @@ -547,8 +552,7 @@ -body [lang::message::lookup $admin_locale acs-subsite.lt_first_names_last_name] } { # We don't fail hard here, just log an error - global errorInfo - ns_log Error "Error sending admin notification to $admin_email.\n$errorInfo" + ns_log Error "Error sending admin notification to $admin_email.\n$::errorInfo" } } @@ -593,13 +597,13 @@ } ad_proc -private auth::local::user_info::GetUserInfo { - user_id + username {parameters ""} } { Implements the GetUserInfo operation of the auth_user_info service contract for the local account implementation. } { - + set user_id [acs_user::get_by_username -username $username] set result(info_status) [auth::get_local_account_status -user_id $user_id] set result(info_message) "" db_1row get_user_info {} -column_array user_info @@ -640,3 +644,9 @@ # No parameters return [list] } + +# Local variables: +# mode: tcl +# tcl-indent-level: 4 +# indent-tabs-mode: nil +# End: