Hi there,
I have a question concerning the redirection functionality of the ‘get new password’ button. When I open the reset password page and klick on the button ‘get new password’ button the e-mail is sent to the user but the reset password page is still visible. There is no redirection to a page like ‘Please check your mail for the new password’.
This is confusing for the user because there is no feedback for the next step in the procedure.What can I do to implement a redirection page that informs the user to check the mails.
Regards,
Ralf
Hi Ralf,
Welcome to BuddyDev forums.Thank you for reporting the issue. Please allow us two days to check and update the plugin.
Thank you
BrajeshHi Brajesh,
thanks for your fast reply and that you will have a look at the issue. In addition I would like to mention that there is also no information page generated when I click on the link in the mail that resets the password.
Here it would be good to inform the user that another mail will be sent that includes the new password.Thanks
Ralf
Hi Ralf,
Thank you for the patience.The plugin is showing the notices. If it is not visible on your site, It is most probably because the template_notice hook is missing.
Please see it in action
https://imgur.com/a/8lik43TWill you be able to modify the page template? If yes, we need to put this code
<?php do_action('template_notices');?>
That will do it.
Regards
BrajeshHi Brajesh,
I made a clean wordpress installation, installed buddypress and the Branded Login plugin and adjusted a standard wordpress theme with your code. Unfortunately it didn’t work.
I found that the buddypress-functions.php removed the action ‘template_notices’ (see: line 610 – 617):/** * We'll handle template notices from BP Nouveau. * * @since 3.0.0 */ public function neutralize_core_template_notices() { remove_action( 'template_notices', 'bp_core_render_message' ); }
The new template notice function is called ‘bp_nouveau_template_notices’. So I added this code in the theme and it worked:
<?php do_action('bp_nouveau_template_notices');?>
What do you say? Is this procedure right?
With best regards
Ralf
- This reply was modified 5 years, 5 months ago by
rabb.
- This reply was modified 5 years, 5 months ago by
Hi Ralf,
Thank you. This is fine for now. I believe we need to add better compatibility with Nouveau.Regards
BrajeshHi Brajesh,
there is one last thing in this context I would like to ask you. Instead of showing notices when the user presses the button ‘get new password’ I would rather like to generate other page content or redirect to a static wordpress page which is probably easier.
To achieve this I would set a hook in the functions.php but I don’t know the appropriate function name. I would appreciate if you told me how I can generate new page content after having clicked the button.Regards
Ralf
Hey Brajseh,
I figured it out. To redirect to a static page after having pressed the button I insterted two lines right after the successful error check of the file class-bl-actions-handler.php:
if ( ! is_wp_error( $errors ) ) { $message = __( 'Password reset link has been sent on your register email address. Please check.', 'bp-branded-login' ); bp_core_add_message( $message, 'success' ); wp_redirect(site_url('/pagename/')); exit; } else { $message = bl_get_error_message( key( $errors->errors ) ); bp_core_add_message( $message, 'error' ); }
The code I’ve posted in post #26694 is faultiy. Unfortunately I cannot edit this post anymore. This is the corrected code:
do_action(bp_nouveau_template_notices());
Regards
Ralf
HI Ralf,
Thank you for sharing. I am going to add some hooks to make it easier in future.Regards
BrajeshHi Ralf,
Thank you for the patience.Please upgrade to 1.4.0.
I have added a hook.
You can hook to ‘bl_password_reset_success’ to do the redirect.
PS:- I have also fixed the notice issue.
Regards
Brajesh
The topic ‘ [Resolved] Branded Login 'get new password' issue’ is closed to new replies.