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.5 -r1.6 --- openacs-4/packages/acs-subsite/www/user/password-update-2.tcl 20 Apr 2002 11:25:04 -0000 1.5 +++ openacs-4/packages/acs-subsite/www/user/password-update-2.tcl 2 May 2002 20:22:49 -0000 1.6 @@ -13,7 +13,7 @@ {return_url ""} } -validate { old_password_match -requires {user_id:integer password_old} { - if {![empty_string_p $user_id] && ![ad_check_password $user_id $password_old]} { + if {![permission::permission_p -object_id $user_id -privilege "admin"] && ![empty_string_p $user_id] && ![ad_check_password $user_id $password_old]} { ad_complain "Your current password does not match what you entered in the form." } } @@ -34,15 +34,13 @@ set user_id [ad_verify_and_get_user_id] permission::require_permission -party_id $user_id -object_id $user_id -privilege "write" } else { - permission::require_permission -party_id $user_id -object_id $user_id -privilege "admin" + permission::require_permission -object_id $user_id -privilege "admin" } if {[catch {ad_change_password $user_id $password_1} errmsg]} { ad_return_error "Wasn't able to change your password. Please contact the system administrator." } -ad_user_login $user_id - if {[empty_string_p $return_url]} { set return_url [ad_parameter -package_id [ad_acs_kernel_id] "HomeURL"] } 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.4 -r1.5 --- openacs-4/packages/acs-subsite/www/user/password-update.adp 2 May 2002 19:32:26 -0000 1.4 +++ openacs-4/packages/acs-subsite/www/user/password-update.adp 2 May 2002 20:22:49 -0000 1.5 @@ -7,12 +7,15 @@
+

@locals@

+
-@export_vars@ + + - + 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.4 -r1.5 --- openacs-4/packages/acs-subsite/www/user/password-update.tcl 17 Apr 2002 21:58:15 -0000 1.4 +++ openacs-4/packages/acs-subsite/www/user/password-update.tcl 2 May 2002 20:22:49 -0000 1.5 @@ -2,7 +2,7 @@ Let's the user change his/her password. Asks for old password, new password, and confirmation. - @cvs-id $Id$ + @version $Id$ } { {user_id ""} {return_url ""} @@ -19,13 +19,13 @@ set user_id [ad_verify_and_get_user_id] permission::require_permission -party_id $user_id -object_id $user_id -privilege "write" } else { - permission::require_permission -party_id $user_id -object_id $user_id -privilege "admin" + permission::require_permission -object_id $user_id -privilege "admin" } +set admin_p [permission::permission_p -object_id $user_id -privilege "admin"] + db_1row user_information {} -set export_vars [export_form_vars return_url user_id] - set site_link [ad_site_home_link] ad_return_template
Current Password: