Skip to:

bb_new_user ?

  • Hey,

    As I’ve just started a new project that will in in bbPress which I havent worked with I really need some help with this command.

    What im trying to do is to RTX-connect bbPress.

    Using this use



    // Below is a very simple PHP 5 script that implements the RPX token URL processing.

    // The code below assumes you have the CURL HTTP fetching library.

    global $bb_current_user, $bbdb;

    $rpxApiKey = ‘XXXXX’;

    if(isset($_POST)) {

    /* STEP 1: Extract token POST parameter */

    $token = $_POST;

    /* STEP 2: Use the token to make the auth_info API call */

    $post_data = array(‘token’ => $_POST,

    ‘apiKey’ => $rpxApiKey,

    ‘format’ => ‘json’);

    $curl = curl_init();

    curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);

    curl_setopt($curl, CURLOPT_URL, ‘;);

    curl_setopt($curl, CURLOPT_POST, true);

    curl_setopt($curl, CURLOPT_POSTFIELDS, $post_data);

    curl_setopt($curl, CURLOPT_HEADER, false);

    curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, false);

    $raw_json = curl_exec($curl);


    /* STEP 3: Parse the JSON auth_info response */

    $auth_info = json_decode($raw_json, true);

    if ($auth_info == ‘ok’) {

    /* STEP 3 Continued: Extract the ‘identifier’ from the response */

    $profile = $auth_info;

    $identifier = $profile;

    if (isset($profile)) {

    echo $photo_url = $profile;


    if (isset($profile)) {

    $name = $profile;


    if (isset($profile)) {

    $email = $profile;


    if ($email || $name ) { bb_new_user(“$name”, “$email”,””,0); echo “grattis $name du har registerat ett konto med $email”; } ยด

    The problem im getting is that it doesnt create any new user and im not even getting an error msg.

    Can someone help me get through this problem.

    Later on ill make it work just like openID does, so you dont have to login, but this is it for now. Also as the request is pretty high on facebook connect ill make this a plugin as soon as its ready.

  • You must be logged in to reply to this topic.
Skip to toolbar