auth::password::get_change_url (public)

 auth::password::get_change_url -user_id user_id

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

Returns the URL to redirect to for changing passwords. If the user's authority has a "change_pwd_url" set, it'll return that, otherwise it'll return a link to /user/password-update under the nearest subsite.

Switches:
-user_id (required)
The ID of the user whose password you want to change.
Returns:
A URL that can be linked to for changing password.

Partial Call Graph (max 5 caller/called nodes):
%3 test_auth_password_get_change_url auth_password_get_change_url (test acs-authentication) auth::password::get_change_url auth::password::get_change_url test_auth_password_get_change_url->auth::password::get_change_url db_1row db_1row (public) auth::password::get_change_url->db_1row export_vars export_vars (public) auth::password::get_change_url->export_vars subsite::get_element subsite::get_element (public) auth::password::get_change_url->subsite::get_element

Testcases:
auth_password_get_change_url
Source code:
    db_1row select_vars {
        select aa.change_pwd_url,
               u.username
        from   auth_authorities aa,
               users u
        where  aa.authority_id = u.authority_id
        and    u.user_id = :user_id
    }

    # Interpolate any username variable in URL
    regsub -all "{username}" $change_pwd_url $username change_pwd_url

    # Default to the OpenACS change password URL
    if { $change_pwd_url eq "" } {
        set change_pwd_url [export_vars -base "[subsite::get_element -element url]user/password-update" { user_id }]
    }

    return $change_pwd_url
XQL Not present:
Generic, PostgreSQL, Oracle
[ hide source ] | [ make this the default ]
Show another procedure: