Index: openacs-4/packages/acs-authentication/tcl/authentication-procs.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/acs-authentication/tcl/authentication-procs.tcl,v
diff -u -r1.17 -r1.18
--- openacs-4/packages/acs-authentication/tcl/authentication-procs.tcl 4 Sep 2003 13:05:28 -0000 1.17
+++ openacs-4/packages/acs-authentication/tcl/authentication-procs.tcl 4 Sep 2003 16:36:17 -0000 1.18
@@ -533,7 +533,7 @@
first_names [_ acs-subsite.First_names] \
last_name [_ acs-subsite.Last_name] \
url [_ acs-subsite.lt_Personal_Home_Page_UR] \
- password [_ acs-subsite.Your_password] \
+ password [_ acs-subsite.Password] \
password_confirm [_ acs-subsite.lt_Password_Confirmation] \
secret_question [_ acs-subsite.Question] \
secret_answer [_ acs-subsite.Answer]]
Index: openacs-4/packages/acs-authentication/tcl/password-procs.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/acs-authentication/tcl/password-procs.tcl,v
diff -u -r1.2 -r1.3
--- openacs-4/packages/acs-authentication/tcl/password-procs.tcl 4 Sep 2003 13:05:28 -0000 1.2
+++ openacs-4/packages/acs-authentication/tcl/password-procs.tcl 4 Sep 2003 16:36:17 -0000 1.3
@@ -156,7 +156,6 @@
password_message: Human-readable message to be relayed to the user. May contain HTML.
} {
-
set forgotten_url [auth::password::get_forgotten_url \
-remote_only \
-authority_id $authority_id \
@@ -186,6 +185,7 @@
# We have retrieved or reset a forgotten password that we should email to the user
with_catch errmsg {
auth::password::email_password \
+ -authority_id $authority_id \
-username $username \
-password $result(password)
@@ -194,7 +194,9 @@
} {
# We could not inform the user of his email - we failed
set result(password_status) "failed_to_connect"
- set result(password_message) [auth::password::get_email_error_msg $errmsg]
+ set result(password_message) [_ acs-subsite.Error_sending_mail]
+ global errorInfo
+ ns_log Error "We had an error sending out email with new password to username $username, authority $authority_id:\n$errorInfo"
}
}
}
@@ -433,7 +435,7 @@
ad_proc -private auth::password::email_password {
{-username:required}
- {-authority_id ""}
+ {-authority_id:required}
{-password:required}
} {
Send an email to ther user with given username and authority with the new password.
@@ -444,31 +446,19 @@
} {
set system_owner [ad_system_owner]
set system_name [ad_system_name]
- set reset_password_url [export_vars -base "[ad_url]/user/password-update" {user_id {password_old $password}}]
- set subject [_ acs-subsite.lt_Your_forgotten_passwo]
- set body "[_ acs-subsite.Your_password]: $password"
+ set user_id [acs_user::get_by_username -authority_id $authority_id -username $username]
+ acs_user::get -user_id $user_id -array user
- set user_email [acs_user::get_element -username $username -authority_id $authority_id -element email]
+ set reset_password_url [export_vars -base "[ad_url]/user/password-update" {user_id {old_password $password}}]
+
+ set subject [_ acs-subsite.lt_Your_forgotten_passwo]
+ set body [_ acs-subsite.Forgotten_password_body]
# Send email
- ns_sendmail $user_email $system_owner $subject $body
+ ns_sendmail $user(email) $system_owner $subject $body
}
-ad_proc -private auth::password::get_email_error_msg { errmsg } {
- Reusable message used when email sending fails.
-
- @author Peter Marklund
-} {
- return "[_ acs-subsite.Error_sending_mail]
-
-
- $errmsg
-
-
-"
-}
-
ad_proc -private auth::password::CanChangePassword {
{-authority_id:required}
} {