public static function currentUserName()
    {
        if (function_exists('\get_user_name')) {
            $username = \get_user_name();
        }
        if (empty($username)) {
            $username   = \get_current_user();
        }
        if (empty($username)) {
            $username   = Request::header('php-auth-user');
        }
        if (empty($username)) {
            $username   = 'system';
        }

        return $username;
    }
public static function currentUserName()
    {
        if (function_exists('\get_user_name')) {
            $username = \get_user_name();
        }
        if (empty($username)) {
            $username   = \get_current_user();
        }
        if (empty($username)) {
            $username   = Request::header('php-auth-user');
        }
        if (empty($username)) {
            $username   = 'system';
        }

        return $username;
    }
public static function currentUserName ( ) { if ( function_exists ( '\get_user_name' ) ) { $ username = \ get_user_name ( ) ; } if ( empty ( $ username ) ) { $ username = \ get_current_user ( ) ; } if ( empty ( $ username ) ) { $ username = Request :: header ( 'php-auth-user' ) ; } if ( empty ( $ username ) ) { $ username = 'system' ; } return $ username ; }
Get the currently logged in user name.

@return string
Get the currently logged in user name .