public static function getTempFolderUsername()
    {
        $user = Environment::getEnv('APACHE_RUN_USER');
        if (!$user) {
            $user = Environment::getEnv('USER');
        }
        if (!$user) {
            $user = Environment::getEnv('USERNAME');
        }
        if (!$user && function_exists('posix_getpwuid') && function_exists('posix_getuid')) {
            $userDetails = posix_getpwuid(posix_getuid());
            $user = $userDetails['name'];
        }
        if (!$user) {
            $user = 'unknown';
        }
        $user = preg_replace('/[^A-Za-z0-9_\-]/', '', $user);
        return $user;
    }