WordPress / two-factor

Two-Factor Authentication for WordPress.
https://wordpress.org/plugins/two-factor/
GNU General Public License v2.0
724 stars 151 forks source link

Last Login #581

Closed capstonedesign closed 1 week ago

capstonedesign commented 1 year ago

Describe the bug

Hello. I am not sure if this is a bug. However, for our site whenever the Two Factor plugin is on, the user's last login meta information is not updated. When I disable the plugin, the last login meta information accurately captures when the user logged in. Any suggestions, or is this a bug?

Steps to Reproduce

  1. Enable Two Factor
  2. Log in
  3. In the database go to the users "last_login" meta column and you'll see it's not updated.

Screenshots, screen recording, code snippet

No response

Environment information

No response

Please confirm that you have searched existing issues in this repository.

Yes

Please confirm that you have tested with all plugins deactivated except Two-Factor.

No

jeffpaul commented 1 year ago

@capstonedesign is that last login meta handled by a separate plugin? If so, perhaps there's some mistimed filters that's not allowing things to work as you'd expect that I can help further troubleshoot if you can confirm if there's another plugin active that exposes/tracks that meta for you?

adriantoll commented 9 months ago

Think this may have to do with the bug I reported in #592 - we wrote some custom code to track last logins, which wasn't updating the last logged in time, and that function was hooked to wp_login. Sounds like this may be caused by the same issue.

kasparsd commented 1 week ago

Marking this as duplicate of #592.