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

Solved We tried to log you in, but...Failed to authorize your account, are the details correct, have you registered? help change account for email

ForgottenNot

Banned User
Joined
Feb 10, 2023
Messages
303
Reaction score
29
Hi

im using canary + znoteacc

i can log in to server with the email + password but in my website i can log in only using username / and password if i use email and password i get this error
LUA:
We tried to log you in, but...
Failed to authorize your account, are the details correct, have you registered?
can you lend me a hand to solve this?

im trying to solve this at login.php at the end of the form i get an error


Can you help me in adapting these to use email instead of account or using name in order to log in please?
edit: im already im able to register using only gmail + password
Post automatically merged:

think the problem is in myaccount.php i use another layout and i have login.php upto date
Post automatically merged:

login.php seems to be ok too
LUA:
    break;

        case "login":
            /* {
                'accountname' => 'username',
                "email":"[email protected]",
                'password' => 'superpass',
                'stayloggedin' => true,
                'token' => '123123', (or not set)
                'type' => 'login',
            } */

            $email = (isset($client->email)) ? sanitize($client->email) : false;
            $username = (isset($client->accountname)) ? sanitize($client->accountname) : false;
            $password = SHA1($client->password);
            $token = (isset($client->token)) ? sanitize($client->token) : false;

            $fields = '`id`, `premdays`';
            if ($config['twoFactorAuthenticator']) $fields .= ', `secret`';

            $account = false;

            if ($email !== false) {
                $fields .= ', `name`';
                $account = mysql_select_single("SELECT {$fields} FROM `accounts` WHERE `email`='{$email}' AND `password`='{$password}' LIMIT 1;");
                if ($account !== false) {
                    $username = $account['name'];
                }
            } elseif ($username !== false) {
                $account = mysql_select_single("SELECT {$fields} FROM `accounts` WHERE `name`='{$username}' AND `password`='{$password}' LIMIT 1;");
            }

            if ($account === false) {
                sendError('Wrong username and/or password.');
            }

            if ($config['twoFactorAuthenticator'] === true && $account['secret'] !== null) {
                if ($token === false) {
                    sendError('Submit a valid two-factor authentication token.', 6);
                } else {
                    require_once("engine/function/rfc6238.php");
                    if (TokenAuth6238::verify($account['secret'], $token) !== true) {
                        sendError('Two-factor authentication failed, token is wrong.', 6);
                    }
                }
            }
Post automatically merged:

solved in myaccount changed from account_id to email the same for register
 
Last edited:

Similar threads

Back
Top