ad_change_password (public)

 ad_change_password \
    [ -password_hash_algorithm password_hash_algorithm ] user_id \
    new_password

Defined in packages/acs-tcl/tcl/security-procs.tcl

Change the user's password

Switches:
-password_hash_algorithm
(defaults to "salted-sha1") (optional)
Parameters:
user_id
new_password

Partial Call Graph (max 5 caller/called nodes):
%3 test_ad_change_check_password ad_change_check_password (test acs-tcl) ad_change_password ad_change_password test_ad_change_check_password->ad_change_password db_dml db_dml (public) ad_change_password->db_dml sec_random_token sec_random_token (public) ad_change_password->sec_random_token acs::test::auth::registration::Register acs::test::auth::registration::Register (private) acs::test::auth::registration::Register->ad_change_password ad_check_password ad_check_password (public) ad_check_password->ad_change_password auth::local::password::ChangePassword auth::local::password::ChangePassword (private) auth::local::password::ChangePassword->ad_change_password auth::local::password::ResetPassword auth::local::password::ResetPassword (private) auth::local::password::ResetPassword->ad_change_password auth::local::registration::Register auth::local::registration::Register (private) auth::local::registration::Register->ad_change_password

Testcases:
ad_change_check_password
Source code:
    if { $user_id eq "" } {
        error "No user_id supplied"
    }

    set salt [sec_random_token]
    set new_password [::security::hash::$password_hash_algorithm $new_password $salt]
    db_dml password_update {
        update users
        set    password = :new_password,
               salt = :salt,
               password_hash_algorithm = :password_hash_algorithm,
               password_changed_date = current_timestamp
        where  user_id = :user_id
    }
Generic XQL file:
packages/acs-tcl/tcl/security-procs.xql

PostgreSQL XQL file:
packages/acs-tcl/tcl/security-procs-postgresql.xql

Oracle XQL file:
packages/acs-tcl/tcl/security-procs-oracle.xql

[ hide source ] | [ make this the default ]
Show another procedure: