Hello.
It seems to be possible to sidestep a disabled account by logging in via Steam.
We link our Steam users to their pre-existing Combu accounts by calling CombuManager.localUser.LinkPlatform. Then later we authenticate them by calling CombuManager.localUser.AuthenticatePlatform with their Steam user ID. That login appears to succeed even if the linked account has been disabled on the Combu server. The disabling works as expected if you log in normally via CombuManager.platform.Authenticate.
Any idea why this might be happening?
Best regards,
Tommi Horttana
Yes, edit /users.php at line 157 add the following code:
$message = "Your account is disabled";
} else {
$success = TRUE;
// ... rest of "if ($user != NULL)" content
}
FRANCESCO CROCETTI @ SKARED CREATIONS
Thanks for the quick help with that. I think we may have edited the users.php file, so the line numbers may not match. Here's what we have, starting on line 153. Where should we insert this new code?
} else {
$message = "No Platform Key and/or Id provided";
}
if ($user != NULL) {
$success = TRUE;
if (SECURITY_ENABLED && $timestamp) {
$user->UpdateSignature($timestamp);
}
if ($user->ActivationCode) {
$message = "You must activate your account by following the link in the email";
$success = FALSE;
} else {
My code should be right after "if ($user != NULL) {", the current code "$success = TRUE;" and after should be inside my new "else".
FRANCESCO CROCETTI @ SKARED CREATIONS
Thanks...but I'm not sure if I quite understood exactly would to do. Would you mind showing me the entire updated code block (adding yours to what I posted)?
if ($user != NULL) { if (!$user->Enabled) { $message = "Your account is disabled"; } else { $success = TRUE; if (SECURITY_ENABLED && $timestamp) { $user->UpdateSignature($timestamp); } if ($user->ActivationCode) { $message = "You must activate your account by following the link in the email"; $success = FALSE; } else { /* * Sample code to add starting equipment on player registration */ /* if ($justCreated) { $startItems = array( array( "name" => "item1", "quantity" => 1 ), array( "name" => "item2", "quantity" => 1 ) ); foreach ($startItems as $itemData) { $newItem = new CB_Inventory(); $newItem->IdAccount = $user->Id; $newItem->Name = $itemData["name"]; $newItem->Quantity = $itemData["quantity"]; $newItem->Save(); } } */ CB_Account::SetSession($user); // Add the registered platforms for the logged user as result $userArray = $user->ToArrayFiltered(); $message = json_encode($userArray); } } } else { $message = "Cannot get the account"; } Utils::EchoJson( Utils::JsonEncodeSuccessMessage($success, $message) );
FRANCESCO CROCETTI @ SKARED CREATIONS
Finally testing this, but it doesn't work -- so far testing with an enabled account, but auto-login fails, with error:
(Filename: /Users/builduser/buildslave/unity/build/artifacts/MacStandalonePlayerGenerated/UnityEngineDebug.cpp Line: 56)
Lexicon last updated: 12/07/2015 17:14:34
(Filename: /Users/builduser/buildslave/unity/build/artifacts/MacStandalonePlayerGenerated/UnityEngineDebug.cpp Line: 56)
<br />
<b>Parse error</b>: syntax error, unexpected '{' in <b>/home/wolfques/public_html/combu/users.php</b> on line <b>156</b><br />
____
Line 156 is
if ($user != NULL) {
So then I reverted and kept the originan line 156, and pasted your code in started on the next line, but then I get another error in the console:
<br />
<b>Parse error</b>: syntax error, unexpected '{' in <b>/home/wolfques/public_html/combu/users.php</b> on line <b>157</b><br />
I'll email the full script to you, hopefully you can spot the problem?
thanks
Dave
There is some UTF-8 chars in your file, may be you used an editor that didn't clear the code when you pasted it. I'm sending my local file that is correct (if you did some changes for your own app/game you will have to re-apply there).
FRANCESCO CROCETTI @ SKARED CREATIONS