Newer
Older
<?php
include_once ($_SERVER['DOCUMENT_ROOT'].'/api/lib/database.class.php');
class User
{
private $db;
$this->db = Database::getConnection();
$this->collection = $this->db->auth;
$this->data = $this->collection->findOne([
'$or' => [
['username' => $username],
['email' => $username]
]
]);
if($this->data == null)