wpweaver (@wpweaver)

Forum Replies Created

Viewing 3 replies - 1 through 3 (of 3 total)

  • wpweaver
    Participant

    @wpweaver

    I don’t think there is a plugin or existing feature that does this.

    I’m really surprised that this isn’t a common question, as it is a real huge issue that allows spammers a backdoor to register as a user to your site. Very bad. This code will redirect all login and password attempts to a static page on your site which can use the regular bbp login, register, and pass shortcodes.

    You can use this custom code:

    <?php
    // intercept the Register and Lost your password? links from the standard WP login screen
    
    define( 'REGISTRATION_URL', 'https://example.com/register');
    
    	add_filter('register_url','custom_redirect_login_register');
    	add_filter('lostpassword_url','custom_redirect_login_register');
    
    	function custom_redirect_login_register($reg_url) {
    		return home_url( REGISTRATION_URL );
    	}
    
    	/**
    	 * Redirects visitors to <code>wp-login.php?action=register</code> to
    	 * <code>site.com/registration-page-name</code>
    	 */
    
    	add_action( 'login_form_register', 'custom_catch_register' );
    	function custom_catch_register()
    	{
    		wp_redirect( home_url( REGISTRATION_URL ) );
    		exit();
    	}
    
    	/*
    	 * intercept bbforum.me/wp-login.php?action=lostpassword and
    	 *           bbforum.me/wp-login.php?action=retrievepassword
    	 *
    	 */
    
    	add_action( 'login_form_lostpassword', 'custom_filter_option' );
    	add_action( 'login_form_retrievepassword', 'custom_filter_option' );
    	/**
    	 * Simple wrapper around a call to add_filter to make sure we only
    	 * filter an option on the login page.
    	 */
    	function custom_filter_option()
    	{
    		wp_redirect( home_url( REGISTRATION_URL ) );
    		exit();
    	}
    ?>

    There are articles on how do add custom code to your bbPress installation.

    Note that this is an option provided with my plugin “Weaver for bbPress” which is a fully turn-key solution to creating a bbPress site. I have not created a stand alone version of this option yet.


    wpweaver
    Participant

    @wpweaver

    Sorry – I misread the topic as being related only to that plugin. Now it makes more sense to me. I thought you’d made a more general question. I guess I would have expected questions about a plugin to be in the general WP plugin forum, but it makes sense to be here too.

    My plugin should be posted in a week or so – depends on the approval queue for plugins.

    It is intended to be sort of a turn-key solution to starting a bbPress forum. Major difference from any other plugin I’ve found is that it has a bunch of pre-defined subThemes for bbPress – look a lot better than the default, will match most themes.


    wpweaver
    Participant

    @wpweaver

    A message by email, or internally?

    I have a new plugin called Weaver for bbPress (in the review queue at this moment) that adds an email mailto: link for moderators to the user’s Profile page. Pretty easy way to do sort of a PM.

    I thought that most users would not want to expose their email address, but that could be made an option.

Viewing 3 replies - 1 through 3 (of 3 total)