Skip to:
Content
Pages
Categories
Search
Top
Bottom

BBPress Auto Login


  • phpbroker1982
    Member

    @phpbroker1982

    I need to implement the Auto Login to BBPress. I have the steps of Auto Login to WordPress and here are the steps:

    require_once (‘blog/wp-blog-header.php’);

    $user_login = ‘screen_name';

    $user = get_userdatabylogin($user_login);

    $user_id = $user->ID;

    wp_set_current_user($user_id, $user_login);

    wp_set_auth_cookie($user_id);

    do_action(‘wp_login’, $user_login);

    Could you please help me to change this code for BBPress Login?

    Thank You.

Viewing 1 replies (of 1 total)
  • Hi

    Use this one for BBpress

    require(‘bbpress/bb-load.php’);

    $user = bb_login( @$_POST, @$_POST, ” );

Viewing 1 replies (of 1 total)

You must be logged in to reply to this topic.