added register check on login
if your account was removed when you were logged in, shit started to happen
This commit is contained in:
parent
87847d6696
commit
f8d85b9b92
@ -105,6 +105,8 @@ session_start();
|
||||
|
||||
function login($uname)
|
||||
{
|
||||
global $database;
|
||||
|
||||
if ($uname != null)
|
||||
{
|
||||
$_SESSION["username"] = $uname;
|
||||
@ -113,7 +115,7 @@ session_start();
|
||||
$uname = $_SESSION["username"];
|
||||
}
|
||||
|
||||
echo "<script>set_login_uname(\"" . $uname . "\")</script>";
|
||||
if (($database -> query("SELECT username FROM user WHERE BINARY username=\"" . $uname . "\"")) -> num_rows == 1) echo "<script>set_login_uname(\"" . $uname . "\")</script>";
|
||||
}
|
||||
?>
|
||||
</body>
|
||||
|
Loading…
x
Reference in New Issue
Block a user