auth::local::password::ResetPassword (private)

 auth::local::password::ResetPassword username parameters \
    [ authority_id ]

Defined in packages/acs-authentication/tcl/local-procs.tcl

Implements the ResetPassword operation of the auth_password service contract for the local account implementation.

Parameters:
username
parameters
authority_id (optional)

Partial Call Graph (max 5 caller/called nodes):
%3 test_auth_password_implementations auth_password_implementations (test acs-authentication) auth::local::password::ResetPassword auth::local::password::ResetPassword test_auth_password_implementations->auth::local::password::ResetPassword acs_user::get_by_username acs_user::get_by_username (public) auth::local::password::ResetPassword->acs_user::get_by_username ad_change_password ad_change_password (public) auth::local::password::ResetPassword->ad_change_password ad_generate_random_string ad_generate_random_string (public) auth::local::password::ResetPassword->ad_generate_random_string AcsSc.auth_password.resetpassword.local AcsSc.auth_password.resetpassword.local (private) AcsSc.auth_password.resetpassword.local->auth::local::password::ResetPassword auth::local::password::register_impl auth::local::password::register_impl (private) auth::local::password::register_impl->auth::local::password::ResetPassword

Testcases:
auth_password_implementations
Source code:
    array set result {
        password_status ok
        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]
    }

    # Reset the password
    set password [ad_generate_random_string]

    ad_change_password $user_id $password

    # We return the new password here and let the OpenACS framework send the email with the new password
    set result(password) $password
    return [array get result]
XQL Not present:
PostgreSQL, Oracle
Generic XQL file:
packages/acs-authentication/tcl/local-procs.xql

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