Changeset 10139
- Timestamp:
- 08/10/2020 07:54:50 AM (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sites/trunk/wordpress.org/public_html/wp-content/plugins/wporg-two-factor/wporg-two-factor.php
r6812 r10139 27 27 28 28 if ( ! is_admin() ) { 29 add_action( 'edit_user_profile', [ $this, 'user_two_factor_options' ] );30 add_action( 'show_user_profile', [ $this, 'user_two_factor_options' ] );29 add_action( 'edit_user_profile', [ , 'user_two_factor_options' ] ); 30 add_action( 'show_user_profile', [ , 'user_two_factor_options' ] ); 31 31 } 32 32 … … 39 39 remove_action( 'login_form_backup_2fa', [ 'Two_Factor_Core', 'backup_2fa' ] ); 40 40 41 add_action( 'wp_login', [ $this, 'wp_login' ], 10, 2 );42 add_action( 'login_form_validate_2fa', [ $this, 'login_form_validate_2fa' ] );43 add_action( 'login_form_backup_2fa', [ $this, 'backup_2fa' ] );41 add_action( 'wp_login', [ , 'wp_login' ], 10, 2 ); 42 add_action( 'login_form_validate_2fa', [ , 'login_form_validate_2fa' ] ); 43 add_action( 'login_form_backup_2fa', [ , 'backup_2fa' ] ); 44 44 45 45 } … … 112 112 113 113 // At this point we know they have a 2FA account, were already logged in, and had a 2FA cookie 114 $this->set_2fa_cookies( get_userdata( $user_id ), $expire );114 set_2fa_cookies( get_userdata( $user_id ), $expire ); 115 115 } 116 116 … … 121 121 } 122 122 123 function set_2fa_cookies( $user, $expiration = false ) {123 function set_2fa_cookies( $user, $expiration = false ) { 124 124 if ( ! $expiration ) { 125 125 // Set the Expiration based on the main Authentication cookie … … 194 194 } 195 195 196 $this->set_2fa_cookies( $user );196 set_2fa_cookies( $user ); 197 197 198 198 // Must be global because that's how login_header() uses it. … … 375 375 if ( $result && $user_id == get_current_user_id() ) { 376 376 $user = wp_get_current_user(); 377 $this->set_2fa_cookies( $user );377 set_2fa_cookies( $user ); 378 378 } 379 379
Note: See TracChangeset
for help on using the changeset viewer.