-
Author
Tagged: ajax, passwords, limit logins
-
June 2, 2014 at 18:47 #19230AdamParticipant
We use Limit Login Attempts as a security measure and I’m wondering if anyone has modified the bad-password handling to notify users that their hammering on the ajax modal login has locked them out?
We basically just want the same error message that appears on the /wp-login.php page after too many failed tries. Because we’re only using the AJAX login modal.
I assume I’ll have to try and make this happen myself since it’s a 3rd-party plugin I’m asking about integrating with. But since it’s a fairly popular plugin I thought perhaps someone may have already done this.
Attachments:
You must be logged in to view attached files.June 7, 2014 at 01:14 #19447AbeKeymasterHi, You should take a look at kleo_ajax_login function in functions.php and instead of the normal message, try echoing $user_signon variable
Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution---
@ SeventhQueen we do our best to have super happy customers. Thanks for being our customer.July 2, 2014 at 22:24 #21582AdamParticipantThanks @abe,
I’ll post my modification in my own functions.php when I get it working
January 15, 2015 at 09:15 #42165AdamParticipantHi Abe,
The user_signon doesn’t ever contain information about being locked out. It’s always just a message about bad credentials, e.g.
COPY CODEWP_Error Object ( [errors:WP_Error:private] => Array ( [incorrect_password] => Array ( [0] => <strong>ERROR</strong>: The password you entered for the username <strong>ataylor</strong> is incorrect. <a href="http://local.meetmindful.com/wp-login.php?action=lostpassword">Lost your password</a>? ) ) [error_data:WP_Error:private] => Array ( ) )
January 15, 2015 at 09:20 #42166AdamParticipantugh, disregard that.
Apparently Limit Login Attempts isn’t installed on my local install.. stand by!
ps. your forum needs post-EDITING 😉
January 15, 2015 at 09:50 #42167AdamParticipantThis works well enough, since I only want to display the first error message in the case of errors
COPY CODEecho json_encode(array( 'loggedin' => false, 'message' => '<span class="wrong-response"><i class="icon icon-attention"></i>' . $user_signon->get_error_message() . '</span>' ));
-
AuthorPosts
You must be logged in to reply to this topic.