• 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!

Possible Block Account ID 1

SaadPro

Member
Joined
Dec 25, 2022
Messages
37
Reaction score
18
Location
Egypt
Any way to block 1/1 account access on website?

That way they can change password, delete, create new characters (NOTE: Latest version of myaac, I'm using otx
Post automatically merged:

And keep account manager works {Myaac}
 
Last edited:
login.php

under
Code:
    $characters = [];
    $account = new OTS_Account();

    $inputEmail = $request->email ?? false;
    $inputAccountName = $request->accountname ?? false;
    $inputToken = $request->token ?? false;
add
Code:
    // Check if email or account name is "1" and reject login
    if ($inputEmail === "1" || $inputAccountName === "1") {
        sendError("Account name or email '1' is not allowed.", 403); // 403 Forbidden
    }

and idk how strict the login stuff is.. but if someone type "1 " idk if it'd find that account or not..

If whitespace is an issue you could trim the e-mail and account name to remove spaces
Code:
$inputEmail = trim($request->email ?? '');
$inputAccountName = trim($request->accountname ?? '');[code]
 
Last edited:
Thanks, Going to try
Post automatically merged:

1709142341719.png
login.php

under
Code:
    $characters = [];
    $account = new OTS_Account();

    $inputEmail = $request->email ?? false;
    $inputAccountName = $request->accountname ?? false;
    $inputToken = $request->token ?? false;
add
Code:
    // Check if email or account name is "1" and reject login
    if ($inputEmail === "1" || $inputAccountName === "1") {
        sendError("Account name or email '1' is not allowed.", 403); // 403 Forbidden
    }[code]

and idk how strict the login stuff is.. but if someone type "1 " idk if it'd find that account or not..

If whitespace is an issue you could trim the e-mail and account name to remove spaces
Code:
$inputEmail = trim($request->email ?? '');
$inputAccountName = trim($request->accountname ?? '');[code]
Like this?
 
Last edited:
Let's try just a string, nothing special?
Code:
    // Check if email or account name is "1" and reject login
    if ($inputEmail === "1" || $inputAccountName === "1") {
        sendError("Account name or email 1 is not allowed.");
    }
 
Let's try just a string, nothing special?
Code:
    // Check if email or account name is "1" and reject login
    if ($inputEmail === "1" || $inputAccountName === "1") {
        sendError("Account name or email 1 is not allowed.");
    }
It doesnt work too, I mean if i am going to login with 1/1 will block you
 
Is that not what you wanted?

Can't login on website with account 1?
 
I don't know why what I posted wouldn't work.

someone else will have to jump in and help
 
Solved by adding this code in accountamangement.php
Lua:
$acc_id = $account_logged->getId();
if($acc_id == 1) die("Access Denied!");
Thanks for who tried to help me
 
Last edited:

Never used myaac before but I'd try something like that:

PHP:
$config_salt_enabled = $db->hasColumn('accounts', 'salt');
$restricted_user_ids = [1];
$login_attempt_possible = (!isset($t) || $t['attempts'] < 5);
$encrypted_password = encrypt(($config_salt_enabled ? $account_logged->getCustomField('salt') : '') . $login_password);
if($account_logged->isLoaded() && !in_array($account_logged->getId(), $restricted_user_ids) && $encrypted_password == $account_logged->getPassword()
   && $login_attempt_possible
  )
{

Or even stop it earlier to save some processing:

PHP:
$restricted_user_names = ['1'];

if(!empty($login_account) && !in_array($login_account, $restricted_user_names) && !empty($login_password))

You should anyway make it impossible to initialize such session.
 
Again
Solved by adding this code in accountamangement.php
Lua:
$acc_id = $account_logged->getId();
if($acc_id == 1) die("Access Denied!");
Thanks for who tried to help me
 
Back
Top