I have a new site and I’m using bbpress beta-3 with it, I’ve created custom login/register/lost-password pages with the custom templates supplied with bbpress and I can’t seem to find the filter/hook/action that “hijacks” the calls to wp-login.php
. My biggest problem is with the lost-password
page, I want to redirect with a notice, I can catch the error but I can’t catch the sent password
event.
I’m now using in function.php:
function get_password_retrieve_errors(){
wp_redirect( site_url('lost-password').'?getpass=failed' );
}
add_filter('lostpassword_redirect', 'get_password_retrieve_errors', 1);
and in form-user-lost-pass.php:
<?php if ( $_GET['getpass'] == 'failed' ) { ?>
<div class="bbp-template-notice error">
<p>Invalid username or e-mail, please try again.</p>
</div>
<?php } ?>
- Is there a way to do it?
- Is there a global $error object which I can always refer to?
- Is there a global $notifications object I can always refer to?
Thanks!
not sure i really follow you either, BUT what about filtering the wp_lostpassword_url
from wp-includes/general-template.php
looks like it has a filter you could use to point it to your custom URL, and even add your ‘getpass’ query var
Here’s a very basic example: