• Resolved 51m0n

    (@51m0n)


    I’m currently experimenting from the free version and I have had to deactivate it as I can’t see how to force all new registrations through Profile Builder. With Form Builder activated users still seem to be able to register through http://www.yoursite.org/wp-login.php and with ‘Anyone can register’ checked this allows registration spam. I’m amazed how much registration spam I got in just a few hours.

    If I can redirect all traffic away from http://www.yoursite.org/wp-login.php and to a Profile Builder registration form then I think I’ll cut the spam.

    Thanks in anticipation.

    Simon

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author Georgian Cocora

    (@raster02)

    Hello Simon,

    The Pro version of Profile Builder allows access to the Custom Redirects module which allows you to set different types of redirects, including redirects to the default WordPress login/register/lost password pages.

    But you can achieve the default WordPress pages redirects with the following code:

    function wppbc_free_default_login_redirect() {
    	$login_page = 'LOGIN_PAGE_URL';
    	$register_page ='REGISTER_PAGE_URL';
    	$password_recovery_page = 'PASSWORD_RECOVERY_PAGE_URL';
    
    	$page = basename($_SERVER['REQUEST_URI']);
    
    	if( $page == "wp-login.php" && $_SERVER['REQUEST_METHOD'] == 'GET') {
    		wp_redirect($login_page);
    		exit;
    	}
    	else if ($page == "wp-login.php?action=register") {
    		wp_redirect($register_page);
    		exit;
    	}
    	else if ($page == "wp-login.php?action=lostpassword") {
    		wp_redirect($password_recovery_page);
    		exit;
    	}
    }
    add_action('init','wppbc_free_default_login_redirect');

    Please add the URLs to your login, register and lost password pages in the first 3 variables at the top of the code.

    Instructions on how to use this code can be found at the top of this page.

    Best Regards,

    Thread Starter 51m0n

    (@51m0n)

    Thank you Georgian.

    Much appreciated. I will see how I get on. I may move on the pro version if testing goes well.

    Regards

    Simon
    21/12/16

    Thread Starter 51m0n

    (@51m0n)

    Sorry one more thing. I’m assuming this code goes in the functions.php file for my theme. Right?

    S

    Plugin Author Georgian Cocora

    (@raster02)

    Hello Simon,

    Either that or check the instructions found at the top of this page.

    Best Regards,

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

The topic ‘Forcing registrations through Profile Builder’ is closed to new replies.