Commit 7b94ed9a authored by Imran Hussain's avatar Imran Hussain
Browse files

Fix a bug where expired old sucs site sessions caused an issue

parent 3881ea0a
......@@ -95,7 +95,7 @@ if ( isset($_POST["username"]) && isset($_POST["password"]) && !$RATELIMITED ) {
$db_connection = pg_connect("dbname=sucssite");
$username = pg_fetch_result(pg_query_params($db_connection, "SELECT * FROM session WHERE hash=$1", array($legacySessionID)), 0, "username");
if ($username !== null) {
if ($username !== null && $username !== false) {
// we have a vlid username from a old session
$DB_CON->exec("UPDATE sessions SET sucs_username='${username}' WHERE id='${SESSIONID}'");
$SUCS_LOGIN = true;
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment