Accounts: libportal Reference Manual

## Accounts Accounts — basic user information |

## Functions

void | xdp_portal_get_user_information ()
GVariant * | xdp_portal_get_user_information_finish ()

## Description

These functions let applications query basic information about the user, such as user ID, name and avatar picture.

The underlying portal is org.freedesktop.portal.Account.

## Functions

### xdp_portal_get_user_information ()

    void
    xdp_portal_get_user_information (XdpPortal *portal,
                                     XdpParent *parent,
                                     const char *reason,
                                     GCancellable *cancellable,
                                     GAsyncReadyCallback callback,
                                     gpointer data);

Gets information about the user.

When the request is done, `callback` will be called. You can then call `xdp_portal_get_user_information_finish()` to get the results.

#### Parameters

portal | a XdpPortal |
parent | parent window information. | [nullable]
reason | (nullable) a string that can be shown in the dialog to explain why the information is needed |
cancellable | optional GCancellable. | [nullable]
callback | a callback to call when the request is done. | [scope async]
data | data to pass to `callback` . | [closure]

### xdp_portal_get_user_information_finish ()

    GVariant *
    xdp_portal_get_user_information_finish
                                   (XdpPortal *portal,
                                    GAsyncResult *result,
                                    GError **error);

Finishes the get-user-information request, and returns the result in the form of a GVariant dictionary containing the following fields:

- id `s`: the user ID

- name `s`: the users real name

- image `s`: the uri of an image file for the users avatar picture

#### Parameters

portal | a XdpPortal |
result | a GAsyncResult |
error | return location for an error |

#### Returns

a GVariant dictionary with user information.

[transfer full]

## Types and Values