This repository has been archived on 2024-06-26. You can view files and clone it, but cannot push or open issues or pull requests.
sakura/_sakura/components/Users.php
2015-03-29 21:59:35 +02:00

33 lines
613 B
PHP

<?php
/*
* User Management
*/
namespace Sakura;
class Users {
// Check if a user is logged in
public static function loggedIn() {
// Just return false for now since we don't have a user system yet
return false;
}
// Get user
public static function getUser($id) {
// Execute query
$user = Database::fetch('users', false, ['id' => [$id, '=']]);
// Return false if no user was found
if(empty($user))
return false;
// If user was found return user data
return $user;
}
}