Generic interface to run methods for missing variables.
Provides delay and caching to prevent unnecessary disk access.
$this->dir = $dir;
$this->login = basename($dir);
}
+
+ function __get($col)
+ {
+ return $this->$col = $this->$col(); # run method and cache
+ }
+
+ function name()
+ {
+ return @file_get_contents("{$this->dir}/name.txt");
+ }
}
function login_password_verify($input, $test)
if (!$users) return;
foreach ($users as $col => $userdir) {
- $user = new User($userdir);
- $user->name = @file_get_contents("{$user->dir}/name.txt");
- $users[$col] = $user;
+ $users[$col] = new User($userdir);
}
print '<ul class="gallery cat">';