KCoreAddons

#include <kuser.h>

Inheritance diagram for KUserId:

Public Member Functions

 KUserId ()
 
 KUserId (K_UID uid)
 
 KUserId (const KUserId &other)
 
- Public Member Functions inherited from KUserOrGroupId< K_UID >
bool isValid () const
 
NativeType nativeId () const
 
bool operator!= (const KUserOrGroupId &other) const
 
bool operator== (const KUserOrGroupId &other) 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 (NativeType nativeId)
 
 KUserOrGroupId (const KUserOrGroupId< K_UID > &other)
 
KUserOrGroupIdoperator= (const KUserOrGroupId< K_UID > &other)
 

Detailed Description

A platform independent user ID.

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

Definition at line 120 of file kuser.h.

Constructor & Destructor Documentation

KUserId::KUserId ( )
inline

Creates an invalid KUserId.

Definition at line 122 of file kuser.h.

KUserId::KUserId ( K_UID  uid)
inlineexplicit

Creates an KUserId from the native user ID type.

Definition at line 124 of file kuser.h.

Member Function Documentation

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

Definition at line 538 of file kuser_unix.cpp.

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

Definition at line 533 of file kuser_unix.cpp.

KUserId KUserId::fromName ( const QString name)
static
Returns
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 505 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-2020 The KDE developers.
Generated on Thu Dec 3 2020 23:03:07 by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.