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

## Functions

void | (*changed) ()
const gchar * | lightdm_user_get_background ()
const gchar * | lightdm_user_get_display_name ()
gboolean | lightdm_user_get_has_messages ()
const gchar * | lightdm_user_get_home_directory ()
const gchar * | lightdm_user_get_image ()
const gchar * | lightdm_user_get_language ()
const gchar * | lightdm_user_get_layout ()
const gchar * const * | lightdm_user_get_layouts ()
gboolean | lightdm_user_get_logged_in ()
const gchar * | lightdm_user_get_name ()
const gchar * | lightdm_user_get_real_name ()
const gchar * | lightdm_user_get_session ()
void | (*user_added) ()
void | (*user_changed) ()
void | (*user_removed) ()
LightDMUserList * | lightdm_user_list_get_instance ()
gint | lightdm_user_list_get_length ()
LightDMUser * | lightdm_user_list_get_user_by_name ()
GList * | lightdm_user_list_get_users ()

## Includes

    #include <lightdm.h>

## 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.

## Functions

### changed ()

    void
    (*changed) (LightDMUser *user);

### lightdm_user_get_background ()

    const gchar *
    lightdm_user_get_background (LightDMUser *user);

Get the background file path for a user.

#### Parameters

user | A LightDMUser |

#### Returns

The background file path for the given user or NULL if no path

### lightdm_user_get_display_name ()

    const gchar *
    lightdm_user_get_display_name (LightDMUser *user);

Get the display name of a user.

#### Parameters

user | A LightDMUser |

#### Returns

The display name of the given user

### lightdm_user_get_has_messages ()

    gboolean
    lightdm_user_get_has_messages (LightDMUser *user);

Check if a user has waiting messages.

#### Parameters

user | A LightDMUser |

#### Returns

TRUE if the user has waiting messages.

### lightdm_user_get_home_directory ()

    const gchar *
    lightdm_user_get_home_directory (LightDMUser *user);

Get the home directory for a user.

#### Parameters

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.

#### Parameters

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.

#### Parameters

user | A LightDMUser |

#### Returns

The language in the form of a local specification (e.g. "de_DE.UTF-8") for the given user or NULL if using the system default locale.

### lightdm_user_get_layout ()

    const gchar *
    lightdm_user_get_layout (LightDMUser *user);

Get the keyboard layout for a user.

#### Parameters

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_layouts ()

    const gchar * const *
    lightdm_user_get_layouts (LightDMUser *user);

Get the configured keyboard layouts for a user.

#### Parameters

user | A LightDMUser |

#### Returns

A NULL-terminated array of keyboard layouts for the given user. Copy the values if you want to use them long term.

[transfer none]

### lightdm_user_get_logged_in ()

    gboolean
    lightdm_user_get_logged_in (LightDMUser *user);

Check if a user is logged in.

#### Parameters

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.

#### Parameters

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.

#### Parameters

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.

#### Parameters

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);

#### Parameters

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.

#### Parameters

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.

#### Parameters

user_list | A LightDMUserList |

#### Returns

A list of LightDMUser that should be presented to the user.

[element-type LightDMUser][transfer none]

## Types and Values