### Method

# Gio Credentials get_unix_user

since: 2.26

#### Declaration [src]

    uid_t
    g_credentials_get_unix_user (
      GCredentials* credentials
      GError** error
    )

#### Description [src]

Tries to get the UNIX user identifier from `credentials`. This method is only available on UNIX platforms.

This operation can fail if `GCredentials` is not supported on the OS or if the native credentials type does not contain information about the UNIX user.

As the signedness of `uid_t` is not specified by POSIX, it is recommended to check `error` for failure rather than trying to check the return value, particularly in language bindings.

Available since: 2.26

#### Return value

Type: `uid_t`

The UNIX user identifier or `(uid_t) -1` if `error` is set.