Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: incorrect created date shown on backup method #572

Open
wants to merge 4 commits into
base: 5
Choose a base branch
from

Conversation

gavynj
Copy link

@gavynj gavynj commented Oct 18, 2024

This PR fixes issue #571

When viewing a member, at the bottom of their member screen on the backend it says whether they have MFA setup and when their recovery codes were created. However, for any user that has MFA setup, the recovery codes created date always shows as today.

@michalkleiner
Copy link
Contributor

Nice finds! The changes look ok to me. I wonder whether we should require the member to be passed always and not fallback to the current user at all.

You may also want to update the doc block when you add a method param and strongly type it to Member.

@michalkleiner
Copy link
Contributor

The lint failure is related.

* @return RegisteredMethod|null
*/
protected function getBackupMethod(): ?RegisteredMethod
protected function getBackupMethod(Member $member): ?RegisteredMethod
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We can't add properties to protected methods in a minor release, as that's a violation of our public API. This change would need to happen in a major release.

Is there a way you can fix this bug without modifying the existing API method signatures?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@GuySartorelli I'm now storing Member in a private property and reverted the method signature back to the original. Let me know if that's ok.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants