Index: openacs-4/packages/acs-subsite/www/register/email-password-2.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-subsite/www/register/Attic/email-password-2.tcl,v diff -u -r1.3 -r1.4 --- openacs-4/packages/acs-subsite/www/register/email-password-2.tcl 14 Apr 2002 04:34:36 -0000 1.3 +++ openacs-4/packages/acs-subsite/www/register/email-password-2.tcl 15 Apr 2002 22:40:50 -0000 1.4 @@ -50,8 +50,9 @@ } if {!$validated_p} { - # Unauthorized Access - ad_return_error "Unauthorized Access" "The validation didn't match what we had. Either press back on the browser and retype it in, or go back to the login page." + ad_return_error \ + "Unauthorized Access" \ + "The validation didn't match what we had. Either press back on the browser and retype it in, or go back to the login page." return } @@ -64,19 +65,31 @@ set system_owner [ad_system_owner] set system_name [ad_system_name] -# Send email -if [catch {ns_sendmail $email $system_owner "Your forgotten password on $system_name" "Here's how you can log in at [ad_url]: +set subject "Your forgotten password on $system_name" +set body "Please follow the following link to reset your password: -Username: $email -Password: $password +[ad_url]/user/password-update?[export_vars {{password_old $password}}] -"} errmsg] { - ad_return_error "Error sending mail" "Now we're really in trouble because we got an error trying to send you email: +" + +# Send email +if [catch {ns_sendmail $email $system_owner $subject $body} errmsg] { + ad_return_error \ + "Error sending mail" \ + "Now we're really in trouble because we got this error:
     $errmsg
   
+when trying to send you the following email: +
+
+Subject: $subject
+
+$body
+  
+
" return } Index: openacs-4/packages/acs-subsite/www/user/password-update-2.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-subsite/www/user/Attic/password-update-2.adp,v diff -u -r1.1 -r1.2 --- openacs-4/packages/acs-subsite/www/user/password-update-2.adp 13 Mar 2001 22:59:26 -0000 1.1 +++ openacs-4/packages/acs-subsite/www/user/password-update-2.adp 15 Apr 2002 22:40:50 -0000 1.2 @@ -1,5 +1,5 @@ -Password Updated +Password Updated

Password Updated

@@ -8,4 +8,3 @@
You can @return_link@ - Index: openacs-4/packages/acs-subsite/www/user/password-update-2.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-subsite/www/user/Attic/password-update-2.tcl,v diff -u -r1.2 -r1.3 --- openacs-4/packages/acs-subsite/www/user/password-update-2.tcl 3 Apr 2002 20:33:18 -0000 1.2 +++ openacs-4/packages/acs-subsite/www/user/password-update-2.tcl 15 Apr 2002 22:40:50 -0000 1.3 @@ -5,7 +5,7 @@
  • password_1 matches password_2 @cvs-id $Id$ -} { +} -query { password_1 password_2 {password_old ""} Index: openacs-4/packages/acs-subsite/www/user/password-update.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-subsite/www/user/password-update.adp,v diff -u -r1.1 -r1.2 --- openacs-4/packages/acs-subsite/www/user/password-update.adp 13 Mar 2001 22:59:26 -0000 1.1 +++ openacs-4/packages/acs-subsite/www/user/password-update.adp 15 Apr 2002 22:40:50 -0000 1.2 @@ -1,33 +1,43 @@ -Update Password +Update Password

    Update Password

    for @first_names@ @last_name@ in @site_link@
    -
    + @export_vars@ + - - - + + + + + + + + + + - - - - + + + + + + + + +
    Current Password: -
    Current Password:
    New Password: -
    Confirm: -
    New Password:
    Confirm:


    +
    - +
    - Index: openacs-4/packages/acs-subsite/www/user/password-update.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-subsite/www/user/password-update.tcl,v diff -u -r1.2 -r1.3 --- openacs-4/packages/acs-subsite/www/user/password-update.tcl 3 Apr 2002 20:33:18 -0000 1.2 +++ openacs-4/packages/acs-subsite/www/user/password-update.tcl 15 Apr 2002 22:40:50 -0000 1.3 @@ -6,6 +6,7 @@ } { {user_id ""} {return_url ""} + {password_old ""} } -properties { first_names:onevalue last_name:onevalue @@ -27,8 +28,7 @@ set bind_vars [ad_tcl_vars_to_ns_set user_id] -db_1row user_information "select first_names, -last_name, email, url from cc_users where user_id=:user_id" -bind $bind_vars +db_1row user_information {} if {$admin_enabled_p} { set export_vars [export_form_vars return_url user_id] Index: openacs-4/packages/acs-subsite/www/user/password-update.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-subsite/www/user/Attic/password-update.xql,v diff -u -r1.1 -r1.2 --- openacs-4/packages/acs-subsite/www/user/password-update.xql 1 May 2001 21:21:15 -0000 1.1 +++ openacs-4/packages/acs-subsite/www/user/password-update.xql 15 Apr 2002 22:40:50 -0000 1.2 @@ -1,12 +1,15 @@ - - - select first_names, -last_name, email, url from cc_users where user_id=:user_id - - - + + + select first_names, + last_name, + email, + url + from cc_users + where user_id = :user_id + +