Hi @prokops, thanks for getting in touch!
I can treat your enquiry about an option to show a notice about 2FA as a development request. We recently had a similar request to force users who haven’t set up 2FA (but have a grace period remaining) to go through the process before they can reach the admin area. I can’t guarantee delivery or provide timescales of any features here on the forums.
Checking whether or not a row exists for the user ID in wp_wfls_2fa_secrets
should let you see if a user has set up 2FA.
Checking whether or not 2FA is required is not quite as straightforward. The required roles are stored in the wp_wfls_settings
table with names in the format required-2fa-role.<role>
where the value is the timestamp at which 2FA was required or -1
if 2FA is not required.
We are unable to support custom code here or guarantee that custom code will continue working as the Wordfence plugin updates over time, but you should be able to work with data above.
Thanks,
Peter.
thanks for the request Peter
For now, I will be checking the usermeta for the 2FA notice and pulling it in frontend like this: https://codeshare.io/ldv3OR
Hi @prokops,
Interesting. Did your code snippet work? Can you share a screenshot showing your “before” and “after” results?
Thank you!
Sure, there is no “before” only “after”, where the notice is shown frontend:
https://pasteboard.co/PrbuXHj3DTyl.png