## LightDMUser

LightDMUser — Get information on a user account

## Functions

const gchar * | lightdm_user_get_name ()
const gchar * | lightdm_user_get_real_name ()
const gchar * | lightdm_user_get_display_name ()
const gchar * | lightdm_user_get_home_directory ()
const gchar * | lightdm_user_get_image ()
const gchar * | lightdm_user_get_background ()
const gchar * | lightdm_user_get_language ()
const gchar * | lightdm_user_get_layout ()
const gchar * const * | lightdm_user_get_layouts ()
const gchar * | lightdm_user_get_session ()
gboolean | lightdm_user_get_logged_in ()
gboolean | lightdm_user_get_has_messages ()
uid_t | lightdm_user_get_uid ()
gboolean | lightdm_user_get_is_locked ()

## Properties

char * | background | Read
CommonUser * | common-user | Write / Construct Only
char * | display-name | Read
gboolean | has-messages | Read
char * | home-directory | Read
char * | image | Read
gboolean | is-locked | Read
char * | language | Read
char * | layout | Read
GStrv | layouts | Read
gboolean | logged-in | Read
char * | name | Read
char * | real-name | Read
char * | session | Read
guint64 | uid | Read

## Signals

void | changed | Run Last

## Object Hierarchy

        GObject
        ╰── LightDMUser

## Includes

    #include <lightdm.h>

## Description

Information about a local user account.

## Functions

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

[nullable]

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

[nullable]

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

[nullable]

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

[nullable]

### 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][array zero-terminated=1]

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

[nullable]

### 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_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_uid ()

    uid_t
    lightdm_user_get_uid (LightDMUser *user);

Get the uid of a user.

#### Parameters

user | A LightDMUser |

#### Returns

The uid of the given user

### lightdm_user_get_is_locked ()

    gboolean
    lightdm_user_get_is_locked (LightDMUser *user);

Get if the user is locked.

#### Parameters

user | A LightDMUser |

#### Returns

`TRUE` if the user is locked

## Property Details

### The `“background”` property

      “background”               char *

User background.

Owner: LightDMUser

Flags: Read

Default value: NULL

### The `“common-user”` property

      “common-user”              CommonUser *

Internal user object.

Owner: LightDMUser

Flags: Write / Construct Only

### The `“display-name”` property

      “display-name”             char *

Users display name.

Owner: LightDMUser

Flags: Read

Default value: NULL

### The `“has-messages”` property

      “has-messages”             gboolean

TRUE if the user is has waiting messages.

Owner: LightDMUser

Flags: Read

Default value: FALSE

### The `“home-directory”` property

      “home-directory”           char *

Home directory.

Owner: LightDMUser

Flags: Read

Default value: NULL

### The `“image”` property

      “image”                    char *

Avatar image.

Owner: LightDMUser

Flags: Read

Default value: NULL

### The `“is-locked”` property

      “is-locked”                gboolean

TRUE if the user is currently locked.

Owner: LightDMUser

Flags: Read

Default value: FALSE

### The `“language”` property

      “language”                 char *

Language used by this user.

Owner: LightDMUser

Flags: Read

Default value: NULL

### The `“layout”` property

      “layout”                   char *

Keyboard layout used by this user.

Owner: LightDMUser

Flags: Read

Default value: NULL

### The `“layouts”` property

      “layouts”                  GStrv

Keyboard layouts used by this user.

Owner: LightDMUser

Flags: Read

### The `“logged-in”` property

      “logged-in”                gboolean

TRUE if the user is currently in a session.

Owner: LightDMUser

Flags: Read

Default value: FALSE

### The `“name”` property

      “name”                     char *

Username.

Owner: LightDMUser

Flags: Read

Default value: NULL

### The `“real-name”` property

      “real-name”                char *

Users real name.

Owner: LightDMUser

Flags: Read

Default value: NULL

### The `“session”` property

      “session”                  char *

Session used by this user.

Owner: LightDMUser

Flags: Read

Default value: NULL

### The `“uid”` property

      “uid”                      guint64

User UID.

Owner: LightDMUser

Flags: Read

Default value: 0

## Signal Details

### The `“changed”` signal

    void
    user_function (LightDMUser *user,
                   gpointer     user_data)

The ::changed signal gets emitted this user account is modified.

#### Parameters

user | A LightDMUser |
user_data | user data set when the signal handler was connected. |

Flags: Run Last