From d763c8be796f804c87b710f20145aeeb5245fb8e Mon Sep 17 00:00:00 2001 From: Patrick Davison Date: Tue, 13 Dec 2011 16:53:17 -0800 Subject: Logging changed-email issue. --- pages/login.php | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) (limited to 'pages') 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("
new-user db register failure of unknown cause.\n -
Also, there were no monkeys trained or otherwise sent to resolve this problem.\n -
Sorry. youtube offered them more.\n", NULL, 10); + $errortext = "
new-user db register failure of unknown cause.\n +
Also, there were no monkeys trained or otherwise sent to resolve this problem.\n +
Sorry. youtube offered them more.\n +
Is this issue repeating? Please email me: snap@pathery.com \n +
Debug data:\n +
Result: $result\n +
SQL Used: $sql\n +
MySQL Error:\n"; + $errortext .= mysql_error(); + DoRedirect($errortext, NULL, 10); exit; } } -- cgit v1.2.3