Skip to:
Content
Pages
Categories
Search
Top
Bottom

Logging into bbpress account from external script


  • Cine
    Member

    @cine

    I’m installing bbPress on a website that is mainly flashbased, and I need the users to be able to login via a form placed inside the frontpage.swf file. This is usually easy: all that’s necessary is a .php file that communicates with the flash, that basically looks like this:

    if($_POST == $correct_username && $_POST == $correct_password){

    echo(“loggedin=true”);

    } else {

    echo(“loggedin=false”);

    }

    Flash will then read the variable returned and work from there.

    The issue is that I can’t figure out how to verify the data against the users table. I’ve studied bb-login.php and login.php, but I still can’t find the code that does the actual logging in – the code that checks the password against the encrypted one in the database, sets the cookie, etcetera.

    Could someone point me in the right direction?

Viewing 1 replies (of 1 total)

  • Cine
    Member

    @cine

    Never mind, figured it out. The functions were really easy to use. I ended up doing it like this:

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

    if(isset($user->ID)) {

    echo(“loggedin=true”);

    } else {

    echo(“loggedin=false”);

    }

Viewing 1 replies (of 1 total)

You must be logged in to reply to this topic.