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

34 lines
613 B
PHP
Raw Normal View History

2015-03-29 15:54:27 +00:00
<?php
/*
* User Management
*/
namespace Sakura;
class Users {
2015-03-29 17:33:06 +00:00
// 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;
}
2015-03-29 15:54:27 +00:00
2015-03-29 19:59:35 +00:00
// 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;
}
2015-03-29 15:54:27 +00:00
}