diff options
-rw-r--r-- | pages/login.php | 17 |
1 files changed, 12 insertions, 5 deletions
diff --git a/pages/login.php b/pages/login.php index fc62e93..bfdf289 100644 --- a/pages/login.php +++ b/pages/login.php @@ -40,8 +40,9 @@ try { require './includes/db.inc.php';
//Unless I already have this information...
//* Modify this to WHERE `email`
- $sql = "SELECT `ID`, `isAdmin`, `openID`, `displayName` FROM `users` WHERE `email` = '$email'";
+ //$sql = "SELECT `ID`, `isAdmin`, `openID`, `displayName` FROM `users` WHERE `email` = '$email'";
//$sql = "SELECT `ID`, `isAdmin` FROM `users` WHERE `openID` = '$claimedid'";
+ $sql = "SELECT `ID`, `isAdmin`, `openID`, `displayName` FROM `users` WHERE `openID` = '$claimedid' OR `email` = '$email'";
$result = mysql_query($sql);
$_SESSION['isAdmin'] = false;
@@ -92,10 +93,16 @@ try { $userID = mysql_insert_id();
} //Oh crap?
else {
- //echo "monkeys and etc";
- DoRedirect("<br />new-user db register failure of unknown cause.\n
- <br />Also, there were no monkeys trained or otherwise sent to resolve this problem.\n
- <br />Sorry. youtube offered them more.\n", NULL, 10);
+ $errortext = "<br />new-user db register failure of unknown cause.\n
+ <br />Also, there were no monkeys trained or otherwise sent to resolve this problem.\n
+ <br />Sorry. youtube offered them more.\n
+ <br />Is this issue repeating? Please email me: snap@pathery.com \n
+ <br />Debug data:\n
+ <br />Result: $result\n
+ <br />SQL Used: $sql\n
+ <br />MySQL Error:\n";
+ $errortext .= mysql_error();
+ DoRedirect($errortext, NULL, 10);
exit;
}
}
|