Skip to:
Content
Pages
Categories
Search
Top
Bottom

Login, Register, Forgot password, Email Confirmation in Front-end only?

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.


    jack_tyler
    Participant

    @jack_tyler

    Hi wpweaver,

    Thanks for this. I’m gonna try your code. 🙂


    oibc
    Participant

    @oibc

    @jack_tyler
    @wpweaver
    I have the same and other problem.
    would you pls help me?

    I am wondering if is there any existing feature on the BBPress to have a login, register, forgot password, email confirmation only in front-end? I know that there are [bbp-login], [bbp-register], and [bbp-lost-pass] short-codes that you can place in the page so that it will display on the front-end but the issue is when user enters an incorrect password or account, it will redirect to admin login. What I wanted is to stay always in the front-end. Or do you have any suggestion what plugin I can use that and compatible?

    I like plugin “Weaver for bbPress” .
    but some problems happens after I installed the plugin “Weaver for bbPress” .
    May I ask?
    1.It is OK that a new user(registered) logged in from frontend,and hide the wp-admin. But after logout ,”Sorry, you don’t have permission to view this profile.”shown on http://mysite.com/forums/users/oi/subscriptions/?loggedout=true
    2. It is OK that admin logged in from frontend. But after logout ,”Sorry, you don’t have permission to view this profile.”shown on http://mysite.com /forums/users/oi/subscriptions/?loggedout=true .
    3. when user enters an incorrect password or account, it will redirect to admin login.

    What I wanted is to stay always in the front-end. Or do you have any suggestion what plugin I can use that and compatible?

Viewing 3 replies - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.
Skip to toolbar