src/Core/TempFolder.php
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;
    }
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;
    }
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 ; }
Returns as best a representation of the current username as we can glean.

@return string
Returns as best a representation of the current username as we can glean .