BuddyDev

Search

[Resolved] Branded Login 'get new password' issue


  • Keymaster
    (BuddyDev Team)
    Posts: 13067
    Brajesh Singh on #26649

    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
    Brajesh


  • Participant
    Level: Enlightened
    Posts: 24
    rabb on #26668

    Hi 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


  • Keymaster
    (BuddyDev Team)
    Posts: 13067
    Brajesh Singh on #26685

    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/8lik43T

    Will 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
    Brajesh


  • Participant
    Level: Enlightened
    Posts: 24
    rabb on #26694

    Hi 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 3 weeks ago by  rabb.

  • Keymaster
    (BuddyDev Team)
    Posts: 13067
    Brajesh Singh on #26702

    Hi Ralf,
    Thank you. This is fine for now. I believe we need to add better compatibility with Nouveau.

    Regards
    Brajesh


  • Participant
    Level: Enlightened
    Posts: 24
    rabb on #26711

    Hi 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


  • Participant
    Level: Enlightened
    Posts: 24
    rabb on #26714

    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


  • Keymaster
    (BuddyDev Team)
    Posts: 13067
    Brajesh Singh on #26726

    HI Ralf,
    Thank you for sharing. I am going to add some hooks to make it easier in future.

    Regards
    Brajesh


  • Keymaster
    (BuddyDev Team)
    Posts: 13067
    Brajesh Singh on #26831

    Hi 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.

This topic is: resolved
Subscribe