Changeset 11329
- Timestamp:
- 11/17/2021 05:46:56 AM (3 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sites/trunk/common/includes/wporg-sso/wp-plugin.php
r11327 r11329 74 74 75 75 add_filter( 'pre_site_option_registration', array( $this, 'inherit_registration_option' ) ); 76 77 add_action( 'wp_login', array( $this, 'record_last_logged_in' ), 10, 2 ); 76 78 77 79 if ( ! $this->is_sso_host() ) { … … 610 612 } 611 613 614 /** 615 * Record the last date a user logged in. 616 * 617 * Note: This might be before they agree to the new TOS, which is recorded separately. 618 */ 619 public function record_last_logged_in( $login, $user ) { 620 update_user_meta( $user->ID, 'last_logged_in', gmdate( 'Y-m-d H:i:s' ) ); 621 } 622 612 623 } 613 624
Note: See TracChangeset
for help on using the changeset viewer.