Gio.Credentials.prototype.get_unix_user

function get_unix_user(): Number(guint) {
    // Gjs wrapper for g_credentials_get_unix_user()
}
  

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

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

Since 2.26

Returns

The UNIX user identifier or -1 if @error is set.