## LightDMUserList

LightDMUserList — Get information on user accounts on this system

## Functions

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

## Properties

int | length | Read
int | num-users | Read

## Signals

void | user-added | Run Last
void | user-changed | Run Last
void | user-removed | Run Last

## Object Hierarchy

        GObject
        ╰── LightDMUserList

## Includes

    #include <lightdm.h>

## Description

An object that contains information about local user accounts.

## Functions

### 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 information 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]

## Property Details

### The `“length”` property

      “length”                   int

Number of login users.

Owner: LightDMUserList

Flags: Read

Allowed values: >= 0

Default value: 0

### The `“num-users”` property

      “num-users”                int

Number of login users.

Owner: LightDMUserList

Flags: Read

Allowed values: >= 0

Default value: 0

## Signal Details

### The `“user-added”` signal

    void
    user_function (LightDMUserList *user_list,
                   LightDMUser     *user,
                   gpointer         user_data)

The ::user-added signal gets emitted when a user account is created.

#### Parameters

user_list | A LightDMUserList |
user | The LightDMUser that has been added. |
user_data | user data set when the signal handler was connected. |

Flags: Run Last

### The `“user-changed”` signal

    void
    user_function (LightDMUserList *user_list,
                   LightDMUser     *user,
                   gpointer         user_data)

The ::user-changed signal gets emitted when a user account is modified.

#### Parameters

user_list | A LightDMUserList |
user | The LightDMUser that has been changed. |
user_data | user data set when the signal handler was connected. |

Flags: Run Last

### The `“user-removed”` signal

    void
    user_function (LightDMUserList *user_list,
                   LightDMUser     *user,
                   gpointer         user_data)

The ::user-removed signal gets emitted when a user account is removed.

#### Parameters

user_list | A LightDMUserList |
user | The LightDMUser that has been removed. |
user_data | user data set when the signal handler was connected. |

Flags: Run Last