LLMS_Controller_Account::reset_password_link_redirect()
Automatically redirect password reset links to the password reset form page.
Description Description
Strips the key
and login
query string parameters and sets them in a cookie (which is accessed later to populate the hidden fields on the reset form) and then redirect to the password reset form.
Return Return
(void)
Source Source
File: includes/forms/controllers/class.llms.controller.account.php
public function reset_password_link_redirect() { if ( is_llms_account_page() && isset( $_GET['key'] ) && isset( $_GET['login'] ) ) { $user = get_user_by( 'login', wp_unslash( llms_filter_input_sanitize_string( INPUT_GET, 'login' ) ) ); $uid = $user ? $user->ID : 0; $val = sprintf( '%1$d:%2$s', $uid, wp_unslash( llms_filter_input_sanitize_string( INPUT_GET, 'key' ) ) ); ( new LLMS_Cache_Helper() )->maybe_no_cache(); llms_set_password_reset_cookie( $val ); llms_redirect_and_exit( add_query_arg( 'reset-pass', 1, llms_lostpassword_url() ) ); } }
Expand full source code Collapse full source code View on GitHub
Changelog Changelog
Version | Description |
---|---|
6.6.0 | Prevented client and server caching of the password reset form page. |
5.9.0 | Stop using deprecated FILTER_SANITIZE_STRING . |
5.0.0 | Introduced. |