## User Accounts User Accounts — Get information on user accounts on this system |

## Synopsis

    #include <lightdm.h>

    void                (*changed)                          (LightDMUser *user);
    const gchar *       lightdm_user_get_display_name       (LightDMUser *user);
    const gchar *       lightdm_user_get_home_directory     (LightDMUser *user);
    const gchar *       lightdm_user_get_image              (LightDMUser *user);
    const gchar *       lightdm_user_get_language           (LightDMUser *user);
    const gchar *       lightdm_user_get_layout             (LightDMUser *user);
    gboolean            lightdm_user_get_logged_in          (LightDMUser *user);
    const gchar *       lightdm_user_get_name               (LightDMUser *user);
    const gchar *       lightdm_user_get_real_name          (LightDMUser *user);
    const gchar *       lightdm_user_get_session            (LightDMUser *user);
    void                (*user_added)                       (LightDMUserList *user_list,
                                                             LightDMUser *user);
    void                (*user_changed)                     (LightDMUserList *user_list,
                                                             LightDMUser *user);
    void                (*user_removed)                     (LightDMUserList *user_list,
                                                             LightDMUser *user);
    LightDMUserList *   lightdm_user_list_get_instance      (void);
    gint                lightdm_user_list_get_length        (LightDMUserList *user_list);
    LightDMUser *       lightdm_user_list_get_user_by_name  (LightDMUserList *user_list,
                                                             const gchar *username);
    GList *             lightdm_user_list_get_users         (LightDMUserList *user_list);

## Description

Object containing information about a user present on this system. LightDMUser objects are not created by the user, but provided by the LightDMGreeter object.

A user has the following properties:

- The user name is used to refer to this user.

- The real name is the name of the person that owns this user account.

- The display name provides text to use for the user label.

- The image URI provides an image to use for the user.

## Details

### changed ()

    void                (*changed)                          (LightDMUser *user);

### lightdm_user_get_display_name ()

    const gchar *       lightdm_user_get_display_name       (LightDMUser *user);

Get the display name of a user.

`user` : | A LightDMUser
Returns : | The display name of the given user

### lightdm_user_get_home_directory ()

    const gchar *       lightdm_user_get_home_directory     (LightDMUser *user);

Get the home directory for a user.

`user` : | A LightDMUser
Returns : | The users home directory

### lightdm_user_get_image ()

    const gchar *       lightdm_user_get_image              (LightDMUser *user);

Get the image URI for a user.

`user` : | A LightDMUser
Returns : | The image URI for the given user or NULL if no URI

### lightdm_user_get_language ()

    const gchar *       lightdm_user_get_language           (LightDMUser *user);

Get the language for a user.

`user` : | A LightDMUser
Returns : | The language for the given user or NULL if using system defaults.

### lightdm_user_get_layout ()

    const gchar *       lightdm_user_get_layout             (LightDMUser *user);

Get the keyboard layout for a user.

`user` : | A LightDMUser
Returns : | The keyboard layout for the given user or NULL if using system defaults. Copy the value if you want to use it long term.

### lightdm_user_get_logged_in ()

    gboolean            lightdm_user_get_logged_in          (LightDMUser *user);

Check if a user is logged in.

`user` : | A LightDMUser
Returns : | TRUE if the user is currently logged in.

### lightdm_user_get_name ()

    const gchar *       lightdm_user_get_name               (LightDMUser *user);

Get the name of a user.

`user` : | A LightDMUser
Returns : | The name of the given user

### lightdm_user_get_real_name ()

    const gchar *       lightdm_user_get_real_name          (LightDMUser *user);

Get the real name of a user.

`user` : | A LightDMUser
Returns : | The real name of the given user

### lightdm_user_get_session ()

    const gchar *       lightdm_user_get_session            (LightDMUser *user);

Get the session for a user.

`user` : | A LightDMUser
Returns : | The session for the given user or NULL if using system defaults.

### user_added ()

    void                (*user_added)                       (LightDMUserList *user_list,
                                                             LightDMUser *user);

### user_changed ()

    void                (*user_changed)                     (LightDMUserList *user_list,
                                                             LightDMUser *user);

### user_removed ()

    void                (*user_removed)                     (LightDMUserList *user_list,
                                                             LightDMUser *user);

### lightdm_user_list_get_instance ()

    LightDMUserList *   lightdm_user_list_get_instance      (void);

Get the user list.

Returns : | the LightDMUserList. [transfer none]

### lightdm_user_list_get_length ()

    gint                lightdm_user_list_get_length        (LightDMUserList *user_list);

`user_list` : | a LightDMUserList
Returns : | The number of users able to log in

### lightdm_user_list_get_user_by_name ()

    LightDMUser *       lightdm_user_list_get_user_by_name  (LightDMUserList *user_list,
                                                             const gchar *username);

Get infomation about a given user or NULL if this user doesn't exist.

`user_list` : | A LightDMUserList
`username` : | Name of user to get.
Returns : | A LightDMUser entry for the given user. [transfer none]

### lightdm_user_list_get_users ()

    GList *             lightdm_user_list_get_users         (LightDMUserList *user_list);

Get a list of users to present to the user. This list may be a subset of the available users and may be empty depending on the server configuration.

`user_list` : | A LightDMUserList
Returns : | A list of LightDMUser that should be presented to the user. [element-type LightDMUser][transfer none]