2015-03-08 18:02:59 +01:00
|
|
|
<?php defined('BLUDIT') or die('Bludit CMS.');
|
|
|
|
|
|
|
|
class dbUsers extends DB_SERIALIZE
|
|
|
|
{
|
|
|
|
function __construct()
|
|
|
|
{
|
|
|
|
parent::__construct(PATH_DATABASES.'users.php');
|
|
|
|
}
|
|
|
|
|
|
|
|
// Return an array with the username databases
|
|
|
|
function get($username)
|
|
|
|
{
|
2015-03-27 02:00:01 +01:00
|
|
|
if($this->validUsername($username)) {
|
|
|
|
return $this->vars['users'][$username];
|
|
|
|
}
|
|
|
|
|
|
|
|
return false;
|
2015-03-08 18:02:59 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
// Return TRUE if the post exists, FALSE otherwise.
|
|
|
|
public function validUsername($username)
|
|
|
|
{
|
|
|
|
return isset($this->vars['users'][$username]);
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|