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

    (@axewww)

    Depend how your custom login is coded, wp_w3all since lastest release try to detect externals logins, and try to bypass those like Ultimate Member or others.

    If you have not problems with wp_w3all logins, and problems are coming out only on your login, can be fixed but, you should see where something go wrong. What you have in this login that you need, recaptcha?

    Thread Starter tonito9

    (@tonito9)

    Hi, thank you for response.

    function custom_login() {
    	if($_POST['log_submit']) {
    		$creds = array();
    		$creds['user_login'] = $_POST['log_username'];
    		$creds['user_password'] = $_POST['log_pass'];
    		$creds['remember'] = true;
    		$user = wp_signon( $creds, false );
    		wp_set_current_user($user);
    		if ( is_wp_error($user) )
    			echo $user->get_error_message();
    	}
    
    }
    // run it before the headers and cookies are sent
    add_action( 'after_setup_theme', 'custom_login' );

    i am using this, and have simple login form, only username, password, remember me and submit button.

    I wan’t to make it so that users only register and login through wordpress.

    After login there is like 16 cookies, all of phpbb cookies content are ‘deleted’ and wordpress cookies content are ‘+’.

    Is there a way to implement custom login, have you done it already?

    Plugin Author axew3

    (@axewww)

    Hello, summer has start here, so sorry for the delay … 2 month of sunshine you know ??
    wp_w3all grab credentials before any action hook: on next can be set as option to be activated or not.

    Look that wp_w3all, when an user login on WP side, send related phpBB cookies browser. When an user login on phpBB side and come into WP side, than wp_w3all detect and validate phpBB cookie, and login the user into WP.

    Now, if you want your custom login code work with wp_w3all, you should take care that your code, send also required phpBB cookies onlogin OR, wp_w3all, will logout you, as can’t find out a valid phpBB cookie to check against. Further more wp_w3all run hooks mainly on init, and not on after_setup_theme: so wp_w3all is executed before your code.
    And the latest addition, about external logins even before just grabbing the $_POST array (look addons/ext_plugins_fixes.php) that is included (if you would like to exclude) on file wp_w3all.php

    //// workaround for some plugin that substitute wp-login.php default login page
    //// ... but that DO NOT reset $_POST array (like some frontend ajax login widget plugin instead do)
    
     require_once( WPW3ALL_PLUGIN_DIR . 'addons/ext_plugins_fixes.php' );  // code, actions and functions
    
    //// END workaround for some plugin that substitute wp-login.php default login page

    There are several, really many answer i could give you, hope this will help, if not, just repost.

    Plugin Author axew3

    (@axewww)

    [solved]

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Custom login problem’ is closed to new replies.