* @var Array An array of users already loaded, the username as user id
*/
publicstatic$hashtableById=[];
/**
* @var array|null An array of the workspaces the user has access to, each element an instance of the Workspace object. As long as the field hasn't been initialized by get_workspaces, null.
*/
private$workspaces=null;
/*
* Initializes a new instance
*
* @param int $id the primary key
*/
function__construct($id=null){
if($id){
$this->id=$id;
$this->load_from_database();
}
}
/**
* Initializes a new User instance if needed or get already available one.