fix: select fetchAll

This commit is contained in:
Johannes Kantz committed 2023-01-19 18:37:48 +01:00
1 parent 082ab46590
commit 464a9c7dbc
2 files changed
+6 -5

No files matched your search

+2 -2
View File
@@ -18,7 +18,7 @@ class User {
return true;
}
public function loginWithUsername(string $username, string $password) : string {
$userObject = $this->db->select("utente", ["nomeUtente" => $username]);
$userObject = $this->db->select("utente", ["nomeUtente" => $username])[0];
if(!$userObject){
return false;
@@ -38,7 +38,7 @@ class User {
return $this->token;
}
public function loginWithToken(string $token){
$userObject = $this->db->select("utente", ["gettone" => $token]);
$userObject = $this->db->select("utente", ["gettone" => $token])[0];
if(!$userObject){
return false;
}