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
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
think the problem is in myaccount.php i use another layout and i have login.php upto date
pastebin.com
login.php seems to be ok too
solved in myaccount changed from account_id to email the same for register
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?
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

<?php require_once 'engine/init.php';protect_page();#region CANCEL CHARACT - Pastebin.com
Pastebin.com is the number one paste tool since 2002. Pastebin is a website where you can store text online for a set period of time.
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: