KUser Class Reference
#include <kuser.h>
Public Types | |
enum | UIDMode { UseEffectiveUID , UseRealUserID } |
Public Member Functions | |
KUser (UIDMode mode=UseEffectiveUID) | |
KUser (long uid) | |
KUser (const TQString &name) | |
KUser (const char *name) | |
KUser (struct passwd *p) | |
KUser (const KUser &user) | |
KUser & | operator= (const KUser &user) |
bool | operator== (const KUser &user) const |
bool | operator!= (const KUser &user) const |
bool | isValid () const |
long | uid () const |
long | gid () const |
bool | isSuperUser () const |
TQString | loginName () const |
TQString | fullName () const |
TQString | roomNumber () const |
TQString | workPhone () const |
TQString | homePhone () const |
TQString | homeDir () const |
TQString | shell () const |
TQValueList< KUserGroup > | groups () const |
TQStringList | groupNames () const |
~KUser () | |
Static Public Member Functions | |
static TQValueList< KUser > | allUsers () |
static TQStringList | allUserNames () |
Detailed Description
Represents a user on your system.
This class represents a user on your system. You can either get information about the current user, of fetch information about a user on the system. Instances of this class will be explicitly shared, so copying objects is very cheap and you can safely pass objects by value.
- Since
- 3.2
Member Enumeration Documentation
◆ UIDMode
enum KUser::UIDMode |
Constructor & Destructor Documentation
◆ KUser() [1/6]
KUser::KUser | ( | UIDMode | mode = UseEffectiveUID | ) |
Creates an object that contains information about the current user.
(as returned by getuid(2) or geteuid(2), taking $LOGNAME/$USER into account).
- Parameters
-
mode if UseEffectiveUID is passed the effective user is returned. If UseRealUserID is passed the real user will be returned. The real UID will be different than the effective UID in setuid programs; in
such a case use the effective UID for checking permissions, and the real UID for displaying information about the user.
◆ KUser() [2/6]
KUser::KUser | ( | long | uid | ) |
◆ KUser() [3/6]
KUser::KUser | ( | const TQString & | name | ) |
◆ KUser() [4/6]
KUser::KUser | ( | const char * | name | ) |
◆ KUser() [5/6]
KUser::KUser | ( | struct passwd * | p | ) |
◆ KUser() [6/6]
KUser::KUser | ( | const KUser & | user | ) |
◆ ~KUser()
Member Function Documentation
◆ allUserNames()
|
static |
◆ allUsers()
|
static |
◆ fullName()
TQString KUser::fullName | ( | ) | const |
◆ gid()
long KUser::gid | ( | ) | const |
◆ groupNames()
TQStringList KUser::groupNames | ( | ) | const |
◆ groups()
TQValueList< KUserGroup > KUser::groups | ( | ) | const |
◆ homeDir()
TQString KUser::homeDir | ( | ) | const |
◆ homePhone()
TQString KUser::homePhone | ( | ) | const |
◆ isSuperUser()
bool KUser::isSuperUser | ( | ) | const |
◆ isValid()
bool KUser::isValid | ( | ) | const |
◆ loginName()
TQString KUser::loginName | ( | ) | const |
◆ operator!=()
bool KUser::operator!= | ( | const KUser & | user | ) | const |
◆ operator=()
◆ operator==()
bool KUser::operator== | ( | const KUser & | user | ) | const |
◆ roomNumber()
TQString KUser::roomNumber | ( | ) | const |
◆ shell()
TQString KUser::shell | ( | ) | const |
◆ uid()
long KUser::uid | ( | ) | const |
◆ workPhone()
TQString KUser::workPhone | ( | ) | const |
The documentation for this class was generated from the following files: