Steam Authentication & Integration

Steam Authentication & Integration 1.6.3

No permission to download
Help Me :)

Wrong
Server Error
Mysqli prepare error: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ') AND p.is_banned NOT IN (1) ' at line 5
 
NOTE:

I will be unavailable for a week, apologies.



@HowIChrgeLazer is it possible to change the locale for the Steam log in button? Or do I have to find a Steam log in button in my own language and change the picture in the installation folder?

View attachment 128265

It's possible, but it'll require a template edit and a replace of the image link.

Unfortunately, I'm not sure if Steam has different localization for the login buttons. I tried different languages on the API page, and I still got the English button.

Can anyone tell me if there would be a way to add the games tab in the admin CP to be shown to the normal users?
It would be great for people to be able to search the games statistics like i do in the admin CP.

0j4YAmY.png

This is a planned feature in an upcoming version for the steam statistics pages.

My apologies. The error wasn't with the code, it was with closed port. Resolved now, and works like a charm!

Good to hear, glad you got it resolved!

Is there a way to force users to sign up using steam? And force existing users to link their accounts?

Not without editing some of the guts of XenForo AFAIK. There have been other users on here that have done it, but I can't support any changes like that.

Help Me :)

Wrong
Server Error
Mysqli prepare error: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ') AND p.is_banned NOT IN (1) ' at line 5

That's... Strange. Did you input something in the include list or exclude list boxes that's breaking the query? It looks to be the query that fetches game hour stats for the stats page.

When are you receiving this error?
 
Is there a way to only allow sign up and sign in with this?

As in I don't want people being able to sign up through the default process but with steam?
 
Is there a way to only allow sign up and sign in with this?

As in I don't want people being able to sign up through the default process but with steam?
There is no option.
What you can do is search the template for the register form, then delete all the content in there and replace it with the steam login button you already should see now.
This way you delete the whole register form, the steam auth will still work.
 
Now i got a question :D

We had to backup our database and move to another location.
Now all users that registered before the move do not have the steam account displayed.
They are still linked but it just does not show up in messages or under the avater or on the users page.

Is there any way i can fix this?

EDIT: u have run the cron and it resulted in a error (server misconfiguration), it seems that is the problem, that it fails to run the cron so only the first cron upon registration is working, it seems.
We have over 1400 members that are all registered with steam, can this be the problem, that its just too much to handle?
I could not find any errors, will see tomorrow in cpanel if i can find something after running the cron again.
 
Last edited:
Thanks for awesome add-on!

Is there anyone here who might tell me where to find the code to put beneath the avatar in order to get Steam profile there.
I have a custom theme and it does not show under avatar, it does however show if I choose to have default theme.


Thanks!!
 
I am also getting this error message. When I open topOwned, topPlayedRecent, topPlayed in the ACP and as well as the Steam Tab.

Mysqli prepare error: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ') AND p.is_banned NOT IN (1) ' at line 5

  1. Zend_Db_Statement_Mysqli->_prepare() in Zend/Db/Statement.php at line 115
  2. Zend_Db_Statement->__construct() in Zend/Db/Adapter/Mysqli.php at line 381
  3. Zend_Db_Adapter_Mysqli->prepare() in Zend/Db/Adapter/Abstract.php at line 478
  4. Zend_Db_Adapter_Abstract->query() in Zend/Db/Adapter/Abstract.php at line 734
  5. Zend_Db_Adapter_Abstract->fetchAll() in Steam/Helper/Steam.php at line 567
  6. Steam_Helper_Steam->getGameStatistics() in Steam/ControllerAdmin/Steam.php at line 115
  7. Steam_ControllerAdmin_Steam->actionTopOwned() in XenForo/FrontController.php at line 351
  8. XenForo_FrontController->dispatch() in XenForo/FrontController.php at line 134
  9. XenForo_FrontController->run() in /home/sourceas/public_html/admin.php at line 13
 
This is working great for me, thanks for releasing this!!

One suggestion for a future version, it would be nice to be able to see what members have a particular game. For instance in the most recently played. I'd like to be able to mouse over that, get a popup list of those who own it, then clicking on their name, would open their profile so I could PM them, etc.

This would help facilitate getting members to play games with people they might not know yet, or know are playing the same game they are.

Thanks for such a great add-on!
 
I'm getting Zend_Http_Client_Adapter_Exception: Unable to Connect to ssl://steamcdn-a.akamaihd.net:443. Error #0: - library/Zend/Http/Client/Adapter/Socket.php:235 with https auth.
Code:
Stack Trace
#0 /home/xxxx/public_html/forums/library/Zend/Http/Client.php(973): Zend_Http_Client_Adapter_Socket->connect('steamcdn-a.akam...', 443, true)
#1 /home/xxxx/public_html/forums/library/Steam/ControllerPublic/Register.php(500): Zend_Http_Client->request('GET')
#2 /home/xxxx/public_html/forums/library/XenForo/FrontController.php(351): Steam_ControllerPublic_Register->actionSteamRegister()
#3 /home/xxxx/public_html/forums/library/XenForo/FrontController.php(134): XenForo_FrontController->dispatch(Object(XenForo_RouteMatch))
#4 /home/xxxx/public_html/forums/index.php(13): XenForo_FrontController->run()
#5 {main}
Request State
array(3) {
  ["url"] => string(57) "https://www.xxxxx.com/forums/register/steam/register"
  ["_GET"] => array(0) {
  }
  ["_POST"] => array(13) {
    ["username"] => string(8) "steamplz"
    ["email"] => string(24) "somemeail@gmail.com"
    ["timezone"] => string(19) "America/Los_Angeles"
    ["dob_month"] => string(1) "5"
    ["dob_day"] => string(2) "13"
    ["dob_year"] => string(4) "1970"
    ["gender"] => string(0) ""
    ["agree"] => string(1) "1"
    ["associate_login"] => string(0) ""
    ["associate_password"] => string(8) "********"
    ["_xfToken"] => string(8) "********"
    ["redirect"] => string(43) "https://www.xxxxxx.com/forums/articles/"
    ["location"] => string(13) "Parts Unknown"
  }
}
SSL works on my sever obviously, since Xenforo mail can connect to gmail via SSL and:
PHP:
<?php

$v = curl_version();
print $v['ssl_version']; // I get: OpenSSL/1.0.1k
?>
as does this script:
PHP:
<?php
function nxs_cURLTest($url, $msg, $testText){
  $ch = curl_init();
  curl_setopt($ch, CURLOPT_URL, $url);
  curl_setopt($ch, CURLOPT_USERAGENT, "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/47.0.2526.73 Safari/537.36");
  curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
  curl_setopt($ch, CURLOPT_TIMEOUT, 10);
  curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 10);
  $response = curl_exec($ch);
  $errmsg = curl_error($ch);
  $cInfo = curl_getinfo($ch);
  curl_close($ch);
  echo "Testing ... ".$url." - ".$cInfo['url']."<br />";
  if (stripos($response, $testText)!==false)
    echo "....".$msg." - OK<br />";
  else
  {
    echo "....<b style='color:red;'>".$msg." - Problem</b><br /><pre>";
    print_r($errmsg);
    print_r($cInfo);
    print_r(htmlentities($response));
    echo "</pre>There is a problem with cURL. You need to contact your server admin or hosting provider.";
  }
}

  nxs_cURLTest("http://www.nextscripts.com/", "HTTPS to NXS", "Social Networks");
  nxs_cURLTest("http://www.google.com/intl/en/contact/", "HTTP to Google", "Mountain View, CA");
  nxs_cURLTest("https://www.google.com/intl/en/contact/", "HTTPS to Google", "Mountain View, CA");
  nxs_cURLTest("https://www.facebook.com/", "HTTPS to Facebook", 'id="facebook"');
  nxs_cURLTest("https://graph.facebook.com/", "HTTPS to API (Graph) Facebook", 'get');
  nxs_cURLTest("https://www.linkedin.com/nhome/", "HTTPS to LinkedIn", 'rel="canonical" href="https://www.linkedin.com/');
  nxs_cURLTest("https://twitter.com/", "HTTPS to Twitter", "twitter");
?>
and I can resolve steamcdn-a.akamaihd.net just fine since the image is showing up.

So I'm confused on where the script is messing up.
Any chance you can add "Test Steam Integration" to the tools in ACP to help with testing?
 
Last edited:
Now i got a question :D

We had to backup our database and move to another location.
Now all users that registered before the move do not have the steam account displayed.
They are still linked but it just does not show up in messages or under the avater or on the users page.

Is there any way i can fix this?

EDIT: u have run the cron and it resulted in a error (server misconfiguration), it seems that is the problem, that it fails to run the cron so only the first cron upon registration is working, it seems.
We have over 1400 members that are all registered with steam, can this be the problem, that its just too much to handle?
I could not find any errors, will see tomorrow in cpanel if i can find something after running the cron again.

I'd definitely need more data or logs to understand the cause of the problem. But it could be possible the migration wasn't clean?

Thanks for awesome add-on!

Is there anyone here who might tell me where to find the code to put beneath the avatar in order to get Steam profile there.
I have a custom theme and it does not show under avatar, it does however show if I choose to have default theme.


Thanks!!

This is what you'd put in:

<xen:include template="steam_profile_message_info" />

That code is for steam profile under avatars in threads.

I am also getting this error message. When I open topOwned, topPlayedRecent, topPlayed in the ACP and as well as the Steam Tab.

Mysqli prepare error: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ') AND p.is_banned NOT IN (1) ' at line 5

  1. Zend_Db_Statement_Mysqli->_prepare() in Zend/Db/Statement.php at line 115
  2. Zend_Db_Statement->__construct() in Zend/Db/Adapter/Mysqli.php at line 381
  3. Zend_Db_Adapter_Mysqli->prepare() in Zend/Db/Adapter/Abstract.php at line 478
  4. Zend_Db_Adapter_Abstract->query() in Zend/Db/Adapter/Abstract.php at line 734
  5. Zend_Db_Adapter_Abstract->fetchAll() in Steam/Helper/Steam.php at line 567
  6. Steam_Helper_Steam->getGameStatistics() in Steam/ControllerAdmin/Steam.php at line 115
  7. Steam_ControllerAdmin_Steam->actionTopOwned() in XenForo/FrontController.php at line 351
  8. XenForo_FrontController->dispatch() in XenForo/FrontController.php at line 134
  9. XenForo_FrontController->run() in /home/sourceas/public_html/admin.php at line 13

I'll need more data. There's something in common with you and @Nuke. Did you enter in anything in the inclusion or exclusion list in the options?

Something seems to be breaking the SQL query for you guys, maybe escaping it or something.

This is working great for me, thanks for releasing this!!

One suggestion for a future version, it would be nice to be able to see what members have a particular game. For instance in the most recently played. I'd like to be able to mouse over that, get a popup list of those who own it, then clicking on their name, would open their profile so I could PM them, etc.

This would help facilitate getting members to play games with people they might not know yet, or know are playing the same game they are.

Thanks for such a great add-on!

I'll keep this request in mind. Thank you.

I'm getting Zend_Http_Client_Adapter_Exception: Unable to Connect to ssl://steamcdn-a.akamaihd.net:443. Error #0: - library/Zend/Http/Client/Adapter/Socket.php:235 with https auth.
Code:
Stack Trace
#0 /home/xxxx/public_html/forums/library/Zend/Http/Client.php(973): Zend_Http_Client_Adapter_Socket->connect('steamcdn-a.akam...', 443, true)
#1 /home/xxxx/public_html/forums/library/Steam/ControllerPublic/Register.php(500): Zend_Http_Client->request('GET')
#2 /home/xxxx/public_html/forums/library/XenForo/FrontController.php(351): Steam_ControllerPublic_Register->actionSteamRegister()
#3 /home/xxxx/public_html/forums/library/XenForo/FrontController.php(134): XenForo_FrontController->dispatch(Object(XenForo_RouteMatch))
#4 /home/xxxx/public_html/forums/index.php(13): XenForo_FrontController->run()
#5 {main}
Request State
array(3) {
  ["url"] => string(57) "https://www.xxxxx.com/forums/register/steam/register"
  ["_GET"] => array(0) {
  }
  ["_POST"] => array(13) {
    ["username"] => string(8) "steamplz"
    ["email"] => string(24) "somemeail@gmail.com"
    ["timezone"] => string(19) "America/Los_Angeles"
    ["dob_month"] => string(1) "5"
    ["dob_day"] => string(2) "13"
    ["dob_year"] => string(4) "1970"
    ["gender"] => string(0) ""
    ["agree"] => string(1) "1"
    ["associate_login"] => string(0) ""
    ["associate_password"] => string(8) "********"
    ["_xfToken"] => string(8) "********"
    ["redirect"] => string(43) "https://www.xxxxxx.com/forums/articles/"
    ["location"] => string(13) "Parts Unknown"
  }
}
<snip>

It's possible the community was down at that time. That error is because it could not connect to that address. I would have said it's SSL, but you troubleshooted that part.

Are you able to ping that hostname? Does the addon work now?

The actual module that threw that error isn't my code "Error #0: - library/Zend/Http/Client/Adapter/Socket.php:235 with https auth."
 
It's possible the community was down at that time. That error is because it could not connect to that address. I would have said it's SSL, but you troubleshooted that part.

Are you able to ping that hostname? Does the addon work now?

The actual module that threw that error isn't my code "Error #0: - library/Zend/Http/Client/Adapter/Socket.php:235 with https auth."
It's not. It's connecting because
#0 /home/xxxx/public_html/forums/library/Zend/Http/Client.php(973): Zend_Http_Client_Adapter_Socket->connect('steamcdn-a.akam...', 443, true)

It creates a user account but throws an unknown error has occured page once the new user submits. The created forum account is userstate: Valid/Usergroup: Registered User but it doesn't send a welcome email, and if they try to login again, it will ask them to create a new account again.



P.S. They can also enter any email they want, unlike with google/facebook integration which locks it down and it doesn't ask for them to confirm the entered email like Twitter integration does. Can you make it confirm the email please?
 
Last edited:
It's not. It's connecting because
#0 /home/xxxx/public_html/forums/library/Zend/Http/Client.php(973): Zend_Http_Client_Adapter_Socket->connect('steamcdn-a.akam...', 443, true)

It creates a user account but throws an unknown error has occured page once the new user submits. The created forum account is userstate: Valid/Usergroup: Registered User but it doesn't send a welcome email, and if they try to login again, it will ask them to create a new account again.



P.S. They can also enter any email they want, unlike with google/facebook integration which locks it down and it doesn't ask for them to confirm the entered email like Twitter integration does. Can you make it confirm the email please?

Your symptoms sound familiar to this:

https://xenforo.com/community/threads/google-login-and-recaptcha-not-working.102596/

Could be a firewall related issue or something server side perhaps?

Unfortunately, I can't make it like Google/Facebook because the steam API does not pass an e-mail address. I can look into requiring validating like Twitter (I would have to dig in and look, I never worked with the Twitter code in XenForo before).
 
Your symptoms sound familiar to this:

https://xenforo.com/community/threads/google-login-and-recaptcha-not-working.102596/

Could be a firewall related issue or something server side perhaps?

Unfortunately, I can't make it like Google/Facebook because the steam API does not pass an e-mail address. I can look into requiring validating like Twitter (I would have to dig in and look, I never worked with the Twitter code in XenForo before).
There is no firewall on the dedicated box. I disabled IPv6 completely. Is there any way I can debug it for you to give you more information?

Does the webserver doing a 301 from non-https to https have anything to do with the script? I've configured Apache to only use https.
Is this the line causing problems: ["location"] => string(13) "Parts Unknown" ?
 
Last edited:
There is no firewall on the dedicated box. I disabled IPv6 completely. Is there any way I can debug it for you to give you more information?

Does the webserver doing a 301 from non-https to https have anything to do with the script? I've configured Apache to only use https.
Is this the line causing problems: ["location"] => string(13) "Parts Unknown" ?

Have you tried switching to the HTTPS Only in the Steam Auth options? It might help if you're only doing HTTPS.

Parts Unknown is the default case when a person doesn't have a location set on their Steam Profile that matches any of the provided case statements I included, or if their profile is private. (Couldn't help it, I'm a fan of professional wrestling).

I'm not sure where to start aside from that. If the above doesn't fix it, everything you've shown me so far is pointing to an issue outside the addon. Is there anything additional in your PHP/webserver logs?

Did you try adding this after twitter on your test script:

Code:
nxs_cURLTest("https://steamcdn-a.akamaihd.net/", "HTTPS to Steam", "steam");
 
Have you tried switching to the HTTPS Only in the Steam Auth options? It might help if you're only doing HTTPS.

Parts Unknown is the default case when a person doesn't have a location set on their Steam Profile that matches any of the provided case statements I included, or if their profile is private. (Couldn't help it, I'm a fan of professional wrestling).

I'm not sure where to start aside from that. If the above doesn't fix it, everything you've shown me so far is pointing to an issue outside the addon. Is there anything additional in your PHP/webserver logs?

Did you try adding this after twitter on your test script:

Code:
nxs_cURLTest("https://steamcdn-a.akamaihd.net/", "HTTPS to Steam", "steam");
That seems to of shown the problem, I can't believe I didn't try to check steamapi
Code:
SSL certificate problem: unable to get local issuer certificateArray
(
    [url] => https://steamcdn-a.akamaihd.net/
    [content_type] =>
    [http_code] => 0
    [header_size] => 0
    [request_size] => 0
    [filetime] => -1
    [ssl_verify_result] => 1
    [redirect_count] => 0
    [total_time] => 0.020947
    [namelookup_time] => 0.012329
    [connect_time] => 0.020655
    [pretransfer_time] => 0
    [size_upload] => 0
    [size_download] => 0
    [speed_download] => 0
    [speed_upload] => 0
    [download_content_length] => -1
    [upload_content_length] => -1
    [starttransfer_time] => 0
    [redirect_time] => 0
    [redirect_url] =>
    [primary_ip] => 184.84.243.193
    [certinfo] => Array
        (
        )

    [primary_port] => 443
    [local_ip] => xx.xx.xx.xx
    [local_port] => 55744
)
 
That seems to of shown the problem, I can't believe I didn't try to check steamapi
Code:
SSL certificate problem: unable to get local issuer certificateArray
(
    [url] => https://steamcdn-a.akamaihd.net/
    [content_type] =>
    [http_code] => 0
    [header_size] => 0
    [request_size] => 0
    [filetime] => -1
    [ssl_verify_result] => 1
    [redirect_count] => 0
    [total_time] => 0.020947
    [namelookup_time] => 0.012329
    [connect_time] => 0.020655
    [pretransfer_time] => 0
    [size_upload] => 0
    [size_download] => 0
    [speed_download] => 0
    [speed_upload] => 0
    [download_content_length] => -1
    [upload_content_length] => -1
    [starttransfer_time] => 0
    [redirect_time] => 0
    [redirect_url] =>
    [primary_ip] => 184.84.243.193
    [certinfo] => Array
        (
        )

    [primary_port] => 443
    [local_ip] => xx.xx.xx.xx
    [local_port] => 55744
)

Not sure if this helps (or is dated/insecure information), but this was the first thing I found on google (EDIT: do not use these links)

http://unitstep.net/blog/2009/05/05/using-curl-in-php-to-access-https-ssltls-protected-sites/

http://stackoverflow.com/questions/...-error-unable-to-get-local-issuer-certificate
 
Last edited:
Last edited:
Top Bottom