KUser Class Reference
#include <kuser.h>
Public Types | |
enum | UIDMode { UseEffectiveUID, UseRealUserID } |
Public Member Functions | |
KUser (UIDMode mode=UseEffectiveUID) | |
KUser (long uid) | |
KUser (const QString &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 |
QString | loginName () const |
QString | fullName () const |
QString | roomNumber () const |
QString | workPhone () const |
QString | homePhone () const |
QString | homeDir () const |
QString | shell () const |
QValueList< KUserGroup > | groups () const |
QStringList | groupNames () const |
~KUser () | |
Static Public Member Functions | |
static QValueList< KUser > | allUsers () |
static QStringList | 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
enum KUser::UIDMode |
Constructor & Destructor Documentation
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::KUser | ( | long | uid | ) |
KUser::KUser | ( | const QString & | name | ) |
KUser::KUser | ( | const char * | name | ) |
KUser::KUser | ( | struct passwd * | p | ) |
KUser::KUser | ( | const KUser & | user | ) |
Member Function Documentation
QStringList KUser::allUserNames | ( | ) | [static] |
QValueList< KUser > KUser::allUsers | ( | ) | [static] |
QString KUser::fullName | ( | ) | const |
long KUser::gid | ( | ) | const |
QStringList KUser::groupNames | ( | ) | const |
QValueList< KUserGroup > KUser::groups | ( | ) | const |
QString KUser::homeDir | ( | ) | const |
QString KUser::homePhone | ( | ) | const |
bool KUser::isSuperUser | ( | ) | const |
bool KUser::isValid | ( | ) | const |
QString KUser::loginName | ( | ) | const |
bool KUser::operator!= | ( | const KUser & | user | ) | const |
bool KUser::operator== | ( | const KUser & | user | ) | const |
QString KUser::roomNumber | ( | ) | const |
QString KUser::shell | ( | ) | const |
long KUser::uid | ( | ) | const |
QString KUser::workPhone | ( | ) | const |
The documentation for this class was generated from the following files: