## ThunarUserManager ThunarUserManager |

## Functions

guint32 | thunar_group_get_id ()
const gchar * | thunar_group_get_name ()
GList * | thunar_user_get_groups ()
const gchar * | thunar_user_get_name ()
const gchar * | thunar_user_get_real_name ()
gboolean | thunar_user_is_me ()
ThunarUserManager * | thunar_user_manager_get_default ()
ThunarGroup * | thunar_user_manager_get_group_by_id ()
ThunarUser * | thunar_user_manager_get_user_by_id ()
GList * | thunar_user_manager_get_all_groups ()

## Object Hierarchy

        GObject
        ├── ThunarGroup
        ├── ThunarUser
        ╰── ThunarUserManager

## Description

## Functions

### thunar_group_get_id ()

    guint32
    thunar_group_get_id (ThunarGroup *group);

Returns the unique id of the given `group` .

#### Parameters

group | a ThunarGroup. |

#### Returns

the unique id of `group` .

### thunar_group_get_name ()

    const gchar *
    thunar_group_get_name (ThunarGroup *group);

Returns the name of the `group` . If the system is unable to determine the name of `group` , it'll return the group id as string.

#### Parameters

group | a ThunarGroup. |

#### Returns

the name of `group` .

### thunar_user_get_groups ()

    GList *
    thunar_user_get_groups (ThunarUser *user);

Returns all ThunarGroups that `user` belongs to. The returned list and the ThunarGroups contained within the list are owned by `user` and must not be freed or altered by the caller.

Note that if `user` has a primary group, this group will also be contained in the returned list.

#### Parameters

user | a ThunarUser. |

#### Returns

the groups that `user` belongs to.

### thunar_user_get_name ()

    const gchar *
    thunar_user_get_name (ThunarUser *user);

Returns the name of `user` . If the system is unable to determine the account name of `user` , it'll return the user id as string.

#### Parameters

user | a ThunarUser. |

#### Returns

the name of `user` .

### thunar_user_get_real_name ()

    const gchar *
    thunar_user_get_real_name (ThunarUser *user);

Returns the real name of `user` or `NULL` if the real name for `user` is not known to the underlying system.

#### Parameters

user | a ThunarUser. |

#### Returns

the real name for `user` or `NULL`.

### thunar_user_is_me ()

    gboolean
    thunar_user_is_me (ThunarUser *user);

Checks whether the owner of the current process is described by `user` .

#### Parameters

user | a ThunarUser. |

#### Returns

`TRUE` if `user` is the owner of the current process, else `FALSE`.

### thunar_user_manager_get_default ()

    ThunarUserManager *
    thunar_user_manager_get_default (void);

Returns the default ThunarUserManager instance, which is shared by all modules using the user module. Call `g_object_unref()` on the returned object when you are done with it.

#### Returns

the default ThunarUserManager instance.

### thunar_user_manager_get_group_by_id ()

    ThunarGroup *
    thunar_user_manager_get_group_by_id (ThunarUserManager *manager,
                                         guint32 id);

Looks up the ThunarGroup corresponding to `id` in `manager` . Returns `NULL` if `manager` is unable to determine the ThunarGroup for `id` , else a pointer to the corresponding ThunarGroup. The caller is responsible for freeing the returned object using `g_object_unref()`.

#### Parameters

manager | a ThunarUserManager. |
id | the group id. |

#### Returns

the ThunarGroup corresponding to `id` or `NULL`.

### thunar_user_manager_get_user_by_id ()

    ThunarUser *
    thunar_user_manager_get_user_by_id (ThunarUserManager *manager,
                                        guint32 id);

Looks up the ThunarUser corresponding to `id` in `manager` . Returns `NULL` if `manager` is unable to determine the ThunarUser for `id` , else a pointer to the corresponding ThunarUser. The caller is responsible for freeing the returned object using `g_object_unref()`.

#### Parameters

manager | a ThunarUserManager. |
id | the user id. |

#### Returns

the ThunarUser corresponding to `id` or `NULL`.

### thunar_user_manager_get_all_groups ()

    GList *
    thunar_user_manager_get_all_groups (ThunarUserManager *manager);

Returns the list of all ThunarGroups in the system that are known to the `manager` .

The caller is responsible to free the returned list using:

    1
    g_list_free_full (list, g_object_unref);

#### Parameters

manager | a ThunarUserManager. |

#### Returns

the list of all groups known to the `manager` .