two-factor
two-factor copied to clipboard
Error Reporting from Saving methods
As the save methods are currently architected, errors are not returned and are therefore unusable outside of the normal save method. It would be useful to have a way of retrieving these errors for use outside of this default setup.
For example, when working on the force-2fa functionality I have a standalone takeover view that uses AJAX to submit the settings and re-load to a normal view once submitted. the problem is that I have no useful information coming back from the save methods so I have to re-load the page whether saving was successful or not which is very confusing from a user's perspective.
I ran into this myself while integrating the two-factor
plugin outside the admin area. I had to use the 'updated_user_meta'
hook to see which user meta key was being saved to make some determinations based on that.
Should be tied to the following issue: #335.