We don't really need the current user ID, just some token that is unique to the current user. 

Hash of home drive might be OK, like:

```php
$id = null;
if (function_exists('posix_getuid'))
if (getenv('HOME')) {
  $id = md5(getenv('HOME'));
}
else if (!empty($_SERVER['HOMEDRIVE']) && !empty($_SERVER['HOMEPATH'])) {
  $id = md5($_SERVER['HOMEDRIVE'] . $_SERVER['HOMEPATH']);
}
```

Otherwise something like this might work (missing windows compatibility maybe)?

```php
$tries = array('APACHE_RUN_USER', 'LOGNAME', 'USERNAME', 'USER');
foreach ($tries as $try) {
  if (!empty($_ENV[$try])) { $id = $_ENV[$try]; break; }
  if (!empty($_SERVER[$try])) { $id = $_SERVER[$try]; break; }
}
```