Initial Release v1.0.0: Full feature set with Docker automation, Nginx/Alpine stack

This commit is contained in:
dyzulk
2026-01-16 11:21:32 +07:00
commit 45623973a8
139 changed files with 24302 additions and 0 deletions

24
app/Models/User.php Normal file
View File

@@ -0,0 +1,24 @@
<?php
namespace App\Models;
use App\Core\Database;
class User {
private $db;
public function __construct() {
$this->db = Database::getInstance();
}
public function attempt($username, $password) {
$stmt = $this->db->query("SELECT * FROM users WHERE username = ?", [$username]);
$user = $stmt->fetch();
if ($user && password_verify($password, $user['password'])) {
return $user;
}
return false;
}
}