1
0
mirror of https://github.com/devcode-it/openstamanager.git synced 2025-01-10 14:44:04 +01:00

Fix controllo campo enabled per autenticazione tramite token

This commit is contained in:
Luca 2018-05-03 13:09:50 +02:00
parent 22dff2511d
commit d9f9461e9f

View File

@ -55,7 +55,7 @@ class Auth extends \Util\Singleton
if (API::isAPIRequest()) {
$token = API::getRequest()['token'];
$id = $database->fetchArray('SELECT `id_utente` FROM `zz_tokens` WHERE `token` = '.prepare($token))[0]['id_utente'];
$id = $database->fetchArray('SELECT `id_utente` FROM `zz_tokens` WHERE `enabled` = 1 AND `token` = '.prepare($token))[0]['id_utente'];
}
// Controllo sulla sessione attiva
elseif (!empty($_SESSION['id_utente'])) {