#include <kuser.h>

Inheritance diagram for KUserId:

Public Member Functions

 KUserId ()
 KUserId (const KUserId &other)
 KUserId (K_UID uid)
- Public Member Functions inherited from KUserOrGroupId< K_UID >
bool isValid () const
bool isValid () const
NativeType nativeId () const
void * nativeId () const
bool operator!= (const KUserOrGroupId &other) const
bool operator!= (const KUserOrGroupId< void * > &other) const
bool operator== (const KUserOrGroupId &other) const
bool operator== (const KUserOrGroupId< void * > &other) const
QString toString () const
QString toString () const

Static Public Member Functions

static KUserId currentEffectiveUserId ()
static KUserId currentUserId ()
static KUserId fromName (const QString &name)

Additional Inherited Members

- Public Types inherited from KUserOrGroupId< K_UID >
typedef K_UID NativeType
- Protected Member Functions inherited from KUserOrGroupId< K_UID >
 KUserOrGroupId ()
 KUserOrGroupId (const KUserOrGroupId< K_UID > &other)
 KUserOrGroupId (const KUserOrGroupId< void * > &other)
 KUserOrGroupId (NativeType nativeId)
 KUserOrGroupId (void *nativeId)
KUserOrGroupIdoperator= (const KUserOrGroupId< K_UID > &other)
KUserOrGroupId< void * > & operator= (const KUserOrGroupId< void * > &other)

Detailed Description

A platform independent user ID.

See also
Alex Richardson arich[email protected]ards[email protected]on.kd[email protected][email protected][email protected]ail.c[email protected]om

Definition at line 133 of file kuser.h.

Constructor & Destructor Documentation

◆ KUserId() [1/2]

KUserId::KUserId ( )

Creates an invalid KUserId.

Definition at line 135 of file kuser.h.

◆ KUserId() [2/2]

KUserId::KUserId ( K_UID  uid)

Creates an KUserId from the native user ID type.

Definition at line 139 of file kuser.h.

Member Function Documentation

◆ currentEffectiveUserId()

KUserId KUserId::currentEffectiveUserId ( )
a KUserId for the current effective user. This is like ::geteuid() on UNIX.
Windows does not have setuid binaries, so on Windows this will always be the same as KUserId::currentUserId()

Definition at line 620 of file kuser_unix.cpp.

◆ currentUserId()

KUserId KUserId::currentUserId ( )
a KUserId for the current user. This is like ::getuid() on UNIX.

Definition at line 615 of file kuser_unix.cpp.

◆ fromName()

KUserId KUserId::fromName ( const QString name)
a KUserId for the user with name name, or an invalid KUserId if no user with this name was found on the system

Definition at line 587 of file kuser_unix.cpp.

The documentation for this struct was generated from the following files:
This file is part of the KDE documentation.
Documentation copyright © 1996-2023 The KDE developers.
Generated on Thu Mar 23 2023 04:11:30 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.