Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3613308
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 18, 20262026-05-18T22:06:26+00:00 2026-05-18T22:06:26+00:00

Im currently working on a RTX/Janrain integration with bbPress, but im stuck with a

  • 0

Im currently working on a RTX/Janrain integration with bbPress, but im stuck with a SQL query which doesnt give me any results even though I’ve been trying with wildcards and an e-mail adress i know is registered.

Sign In

$rpxApiKey = ‘xxxxx’;

if(isset($_POST[‘token’])) { /*
STEP 1: Extract token POST parameter
*/ $token = $_POST[‘token’];

/* STEP 2: Use the token to make the
auth_info API call */ $post_data =
array(‘token’ => $_POST[‘token’],
‘apiKey’ => $rpxApiKey,
‘format’ => ‘json’);

$curl = curl_init();
curl_setopt($curl,
CURLOPT_RETURNTRANSFER, true);
curl_setopt($curl, CURLOPT_URL,
‘https://rpxnow.com/api/v2/auth_info’);
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);
curl_close($curl);

/* STEP 3: Parse the JSON auth_info
response */ $auth_info =
json_decode($raw_json, true);

if ($auth_info[‘stat’] == ‘ok’) {
/* STEP 3 Continued: Extract the ‘identifier’ from the response */
$profile = $auth_info[‘profile’];
$identifier = $profile[‘identifier’];
$profile[‘identifier’];
if (isset($profile[‘photo’])) {
$photo_url = $profile[‘photo’];
}

if (isset($profile['displayName']))  {
  $name = $profile['displayName'];
}

if (isset($profile[’email’])) {
$email = $profile[’email’];
}
/* Step 5, Check if user existis in database, if so login, if
not create new user then login*/
global $bbdb; $querystr = ”
SELECT * FROM $bbdb->bb_users
WHERE user_email = $email LIMIT
1″; $rtx_user_id =
$bbdb->get_results($querystr, OBJECT);
print_r($rtx_user_id);
if ($rtx_user_id) {
echo “Great success”;
wp_set_auth_cookie( (int) $rtx_user_id, 0 ); // 0 = don’t
remember, short login, todo: use form
value do_action(‘bb_user_login’,
(int) $rtx_user_id ); } if
(!$rtx_user_id) { echo “Not great
success”;}

/* STEP 6: Use the identifier as the unique key to sign the user into

your system.
This will depend on your website implementation, and you should
add your own
code here.
*/

/* an error occurred */ }

else { // gracefully handle the
error. Hook this into your native
error handling system. echo ‘An
error occured: ‘ .
$auth_info[‘err’][‘msg’]; } } } ?>

The problem accrues in Step 5 which is to check if the user exists.

Thanks in advance,
Marten

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-18T22:06:27+00:00Added an answer on May 18, 2026 at 10:06 pm

    As we talked on twitter, the query line should be

    $querystr = "SELECT * FROM $bbdb->users WHERE user_email = '$email' LIMIT 1";
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Currently working with Oracle, but will also need a solution for MS SQL. I
Currently working on something which uses ajax for some pagination. What I'm looking to
Im currently working on a project which uses jqGrid with multiple subgrids. I'm trying
Im currently working on troubleshooting an old job which is taking long in running
Im currently working on a site which will contain a products catalog. I am
I am currently working on a homework assignment and I am thoroughly stuck. I
Im currently working on making a flash platformer engine...but my collision detect needs some
Currently working on a snippet to input variables in which a user changes a
Currently working on a pretty basic hosted PHP app which I'm in the process
Im currently working on a timer app similar to apple's default Clock utility but

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.