auth::local::password::ChangePassword (private)
auth::local::password::ChangePassword username new_password \
[ old_password ] [ parameters ] [ authority_id ]Defined in packages/acs-authentication/tcl/local-procs.tcl
Implements the ChangePassword operation of the auth_password service contract for the local account implementation.
- Parameters:
- username (required)
- new_password (required)
- old_password (optional)
- parameters (optional)
- authority_id (optional)
- Partial Call Graph (max 5 caller/called nodes):
- Testcases:
- auth_password_implementations
Source code: array set result { password_status {} password_message {} } set user_id [acs_user::get_by_username -authority_id $authority_id -username $username] if { $user_id eq "" } { set result(password_status) "no_account" return [array get result] } if { $old_password ne "" } { if { ![ad_check_password $user_id $old_password] } { set result(password_status) "old_password_bad" return [array get result] } } ad_try { ad_change_password $user_id $new_password } on error {errorMsg} { set result(password_status) "change_error" ad_log Error "Error changing local password for username $username, user_id $user_id: $errorMsg" return [array get result] } set result(password_status) "ok" auth::local::password::notify_changed $user_id return [array get result]XQL Not present: PostgreSQL, Oracle Generic XQL file: packages/acs-authentication/tcl/local-procs.xql