DirektiveDesDons/User.php
Johannes Kantz 7b5672d36b quick safe
2023-01-12 14:44:52 +01:00

30 lines
723 B
PHP

<?php
require_once("BancaDati/BancaDati.php");
use BancaDati\BancaDati;
class User {
public string $username;
public string $email;
public string $token;
private string $password;
private BancaDati $db;
public function __construct() {
$db = new BancaDati();
return $this;
}
public function exists() {
return true;
}
public function loginWithUsername(string $username, string $password) : string {
$userObject = $this->db->select("utente", ["username" => $username]);
var_dump($userObject);
if(!$userObject){
return false;
}
return "token";
}
public function loginWithToken(string $token){
}
}