From 35e1a863f6404d5630c3000b720f6ba99bf8548e Mon Sep 17 00:00:00 2001 From: Snap Date: Sun, 3 May 2015 23:00:34 -0700 Subject: Login fixes and matches progress --- pages/login.php | 20 +++----- pages/matches.php | 140 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 147 insertions(+), 13 deletions(-) create mode 100644 pages/matches.php (limited to 'pages') diff --git a/pages/login.php b/pages/login.php index d698527..b0caf07 100644 --- a/pages/login.php +++ b/pages/login.php @@ -19,13 +19,14 @@ include_once('./includes/HybridAuth/Auth.php'); $hybrid_config_file = 'includes/HybridAuth/HybridAuthConfig.php'; +//TODO: SQL needs to be updated to sqli instead. + try { + //OpenID 2.0 Method - if (!$_GET['op'] || $_GET['op'] == 'steam' || $_GET['op'] == 'yahoo') { $openid = new LightOpenID; - //Require Email, and first name. $openid->required = array('namePerson/first', 'contact/email'); @@ -68,26 +69,19 @@ try { DoRedirect("Login failed. Back to the home page with you!"); } - //Google's OpenID Connect method + //Google's OpenID Connect method } else if ($_GET['op'] == 'google') { - - echo "ello..."; - include_once('./includes/google-api-php-client-master/src/Google/autoload.php'); $redirect_uri = $mydomain . "login?op=google"; - //echo "$redirect_uri $google_client_id $google_client_secret "; - $client = new Google_Client(); $client->setClientId($google_client_id); $client->setClientSecret($google_client_secret); $client->setRedirectUri($redirect_uri); $client->setScopes('email'); - //echo 'Tests running'; - if (isset($_GET['code'])) { //echo 'code recpt'; $client->authenticate($_GET['code']); @@ -174,7 +168,7 @@ function createNewUser($claimedid, $display, $email, $oldID = NULL) $sql = "SELECT `ID`, `isAdmin`, `openID`, `displayName`, `dateJoined` FROM `users` WHERE `openID` = '$claimedid' OR `email` = '$email'"; if (isset($oldID)) { - $sql = $sql." OR `openID` = '$oldID'"; + $sql = $sql." OR `openID` = '" . $oldID . "'"; } $result = mysql_query($sql); @@ -237,7 +231,7 @@ function createNewUser($claimedid, $display, $email, $oldID = NULL) if ($result) { $userID = mysql_insert_id(); $dateJoined = date(DateTime::ISO8601); - + //Tutorial done? if (isset($_SESSION['preCompletedTutorial'])) { if ($_SESSION['preCompletedTutorial'] == true) { @@ -280,7 +274,7 @@ function createNewUser($claimedid, $display, $email, $oldID = NULL) $refTo = $_GET['ref']; //DoRedirect("Thank you $display.", $_GET['ref']); DoRedirect("", $refTo, 0); - exit; + return true; } function sendNewUserEmail($userID, $email, $display, $dateJoined) { diff --git a/pages/matches.php b/pages/matches.php new file mode 100644 index 0000000..7fd8559 --- /dev/null +++ b/pages/matches.php @@ -0,0 +1,140 @@ + + + + + + +
+

Available Matches

+ +
+ +
+
+
+
+ -- cgit v1.2.3