• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

AAC ZnoteACC Blocking 1/1 (acc manager) login on website

Lurk

Active Member
Joined
Dec 4, 2017
Messages
336
Reaction score
48
I want to block the account manager login on website, login.php has this code

PHP:
$account = mysql_select_single("SELECT {$fields} FROM `accounts` WHERE `name`='{$username}' AND `password`='{$password}' LIMIT 1;");
        if ($account === false) {
            jsonError('Wrong username and/or password.');
        }

I tried changing if ($account === false) { to
PHP:
if ($account === false) or ($username === "1") {
I also tried == 1
but then whenever I try to log in with any account I get this error in my brower
Code:
Parse error: syntax error, unexpected 'or' (T_LOGICAL_OR) in E:\xampp\htdocs\login.php on line 33
 
got this error
Code:
Parse error: syntax error, unexpected '||' (T_BOOLEAN_OR) in E:\xampp\htdocs\login.php on line 33
 
try this
PHP:
    if(strval($username) === "1"){
        jsonError('This account is blocked.');
    }
    $account = mysql_select_single("SELECT {$fields} FROM `accounts` WHERE `name`='{$username}' AND `password`='{$password}' LIMIT 1;");
    if ($account === false) {
        jsonError('Wrong username and/or password.');
    }
 
Lua:
echo "The user: {$username}";
Add that before "if(strval.." and tell me what shows up in the page
 
nothing appears on the page nor the browser console, dunno if I'm doing something wrong
PHP:
echo "The user: {$username}";
        if(strval($username) === "1"){
            jsonError('This account is blocked.');
        }
            $account = mysql_select_single("SELECT {$fields} FROM `accounts` WHERE `name`='{$username}' AND `password`='{$password}' LIMIT 1;");
        if ($account === false) {
            jsonError('Wrong username and/or password.');
        }
 
Try this
Lua:
    $account = strval($username) === "1" ? false : mysql_select_single("SELECT {$fields} FROM `accounts` WHERE `name`='{$username}' AND `password`='{$password}' LIMIT 1;");
  
    if ($account === false) {
        jsonError('Wrong username and/or password.');
    }
 
add to login.php
PHP:
if (strlen($username) < 3) {
    $errors[] = 'Username is too short.';
}
 
Solution
Back
Top