GLib.Uri.get_user

### Method

# GLib Uriget_user

since: 2.66

#### Declaration

    const gchar*
    g_uri_get_user (
      GUri* uri
    )

#### Description

Gets the ‘username’ component of `uri`‘s userinfo, which may contain `%`-encoding, depending on the flags with which `uri` was created. If `uri` was not created with `G_URI_FLAGS_HAS_PASSWORD` or `G_URI_FLAGS_HAS_AUTH_PARAMS`, this is the same as g_uri_get_userinfo().

Available since: 2.66

#### Return value

Type: `const gchar*`

`uri`‘s user.

The data is owned by the instance.
The return value can be `NULL`.
The value is a NUL terminated UTF-8 string.