Fix api login app

This commit is contained in:
Matteo 2024-01-17 10:45:36 +01:00
parent 17423f2131
commit 3e3d70e87e
1 changed files with 2 additions and 1 deletions

View File

@ -198,7 +198,8 @@ class User extends Model
$database = database();
// Generazione del token per l'utente
$tokens = $database->fetchArray($query);
$query_utenti = 'SELECT * FROM `zz_tokens` WHERE `id_utente` = '.prepare($this->id);
$tokens = $database->fetchArray($query_utenti);
if (empty($tokens)) {
$token = secure_random_string();