diff options
author | Patrick Davison <snapwilliam@gmail.com> | 2011-12-13 16:53:17 -0800 |
---|---|---|
committer | Patrick Davison <snapwilliam@gmail.com> | 2011-12-13 16:53:17 -0800 |
commit | d763c8be796f804c87b710f20145aeeb5245fb8e (patch) | |
tree | 9c1ee5db3db4c68ca922550cad5748cf193a983d /pages/login.php | |
parent | c53c6eb6476ab7f9ef1f080eaa34ec0d076d5ea3 (diff) | |
download | pathery-d763c8be796f804c87b710f20145aeeb5245fb8e.tar.xz |
Logging changed-email issue.
Diffstat (limited to 'pages/login.php')
-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;
}
}
|