Tidied up user-detection code
This commit is contained in:
parent
81a3ac3969
commit
f13d2ed907
@ -18,13 +18,12 @@ try { // Try opening the SQL database connection
|
||||
// Get results from the USERS table
|
||||
$results = $sqlGetUserList->fetch();
|
||||
|
||||
$userExists = false;
|
||||
// Check if user exists
|
||||
if (isset($results)) {
|
||||
if (mb_strtolower($_GET["username"]) != mb_strtolower($results["username"])) {
|
||||
$userExists = false;
|
||||
} else {
|
||||
if (mb_strtolower($_GET["username"]) == mb_strtolower($results["username"])) {
|
||||
$userExists = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user