Fix ultimate member double captcha request when WP login captcha is active as well#49
Merged
gzuidhof merged 1 commit intoFriendlyCaptcha:mainfrom Jun 27, 2022
TheZoker:fix-um
Merged
Fix ultimate member double captcha request when WP login captcha is active as well#49gzuidhof merged 1 commit intoFriendlyCaptcha:mainfrom TheZoker:fix-um
gzuidhof merged 1 commit intoFriendlyCaptcha:mainfrom
TheZoker:fix-um
Conversation
Contributor
Author
|
@gzuidhof Can you please have a look at this? Thanks! |
Collaborator
|
Looks good to me, thank you for the contribution! :) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
I realized, that the UM integration still did not work when the native wordpress login form integration was active as well, so I debugged a little bit.
It seems, that UM integrated with the native wordpress login hook:
https://github.com/ultimatemember/ultimatemember/blob/df4d0c3543d7d22e067fa89f10a32eeec5e9604a/includes/core/um-actions-login.php#L66
which is also triggered here:
friendly-captcha-wordpress/friendly-captcha/modules/wordpress/wordpress_login.php
Line 19 in 8c02f58
So when UM starts a verification request, this hook will also start another verification request, which leads to captcha errors.
I fixed this by checking, if the request was made by UM or not and in case it was made by UM I ignore it and do not start the second request. Maybe there is a more elegant solution to this, but this works fine.Update: I found a more elegant solution by removing the filter wordpress login verification filter, when the login request is made by UM. I think this is a much better solution to the issue.
But please test this with wordpress native login and UM login. Thanks!