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.26.2.5 -r1.26.2.6 --- openacs-4/packages/acs-authentication/tcl/local-procs.tcl 24 Aug 2004 20:43:43 -0000 1.26.2.5 +++ openacs-4/packages/acs-authentication/tcl/local-procs.tcl 21 Sep 2004 17:56:04 -0000 1.26.2.6 @@ -214,8 +214,8 @@ ad_proc -private auth::local::password::ChangePassword { username - old_password new_password + {old_password ""} {parameters {}} {authority_id {}} } { @@ -232,11 +232,14 @@ set result(password_status) "no_account" return [array get result] } - - if { ![ad_check_password $user_id $old_password] } { - set result(password_status) "old_password_bad" - return [array get result] + + if { ![empty_string_p $old_password] } { + if { ![ad_check_password $user_id $old_password] } { + set result(password_status) "old_password_bad" + return [array get result] + } } + if { [catch { ad_change_password $user_id $new_password } errmsg] } { set result(password_status) "change_error" global errorInfo 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.11.2.1 -r1.11.2.2 --- openacs-4/packages/acs-authentication/tcl/password-procs.tcl 9 Jul 2004 22:00:09 -0000 1.11.2.1 +++ openacs-4/packages/acs-authentication/tcl/password-procs.tcl 21 Sep 2004 17:56:04 -0000 1.11.2.2 @@ -101,8 +101,8 @@ array set result [auth::password::ChangePassword \ -authority_id $user(authority_id) \ -username $user(username) \ - -old_password $old_password \ - -new_password $new_password] + -new_password $new_password \ + -old_password $old_password ] # We do this so that if there aren't even a password_status in the array, that gets caught below set dummy $result(password_status) @@ -666,7 +666,7 @@ ad_proc -private auth::password::ChangePassword { {-username:required} - {-old_password:required} + {-old_password ""} {-new_password:required} {-authority_id:required} } { @@ -681,7 +681,7 @@ @author Peter Marklund } { set impl_id [auth::authority::get_element -authority_id $authority_id -element "pwd_impl_id"] - + if { [empty_string_p $impl_id] } { set authority_pretty_name [auth::authority::get_element -authority_id $authority_id -element "pretty_name"] error "The authority '$authority_pretty_name' doesn't support password management" @@ -697,8 +697,8 @@ -impl_id $impl_id \ -operation ChangePassword \ -call_args [list $username \ - $old_password \ $new_password \ + $old_password \ $parameters \ $authority_id]] } Index: openacs-4/packages/auth-ldap/tcl/auth-ldap-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/auth-ldap/tcl/auth-ldap-procs.tcl,v diff -u -r1.6.2.3 -r1.6.2.4 --- openacs-4/packages/auth-ldap/tcl/auth-ldap-procs.tcl 9 Jul 2004 22:00:37 -0000 1.6.2.3 +++ openacs-4/packages/auth-ldap/tcl/auth-ldap-procs.tcl 21 Sep 2004 17:56:25 -0000 1.6.2.4 @@ -71,6 +71,8 @@ } set user_info_impl_id [acs_sc::impl::new_from_spec -spec $spec] + + auth::local_ldap::after_install } ad_proc -private auth::ldap::before_uninstall {} {} { @@ -299,8 +301,8 @@ ad_proc -private auth::ldap::password::ChangePassword { username - old_password new_password + {old_password ""} {parameters {}} {authority_id {}} } { @@ -332,15 +334,17 @@ } } } - + if { ![empty_string_p $dn] && ![empty_string_p $userPassword] } { - if { ![auth::ldap::check_password $userPassword $old_password] } { - set result(password_status) old_password_bad - } else { - auth::ldap::set_password -dn $dn -new_password $new_password -parameters $parameters - set result(password_status) ok - } + if { ![empty_string_p $old_password] || ![auth::ldap::check_password $userPassword $old_password] } { + set result(password_status) old_password_bad + } else { + auth::ldap::set_password -dn $dn -new_password $new_password -parameters $parameters + set result(password_status) ok + } } + + return [array get result] }