Umfragen
user Class Reference

user object holding infos about he user and his configs. Intended to be serialized into the $_SESSION variable More...

Inheritance diagram for user:
iUser LDAPuser MYSQLuser

Public Member Functions

 set_config ($name, $value)
 sets a config variable
 check_config ($name, $value)
 checks if a value can be set as specific config variable
 get_config ($name)
 gets a config variable
 __set ($name, $value)
 php's magic method for setting private data
 __get ($name)
 php's magic method for getting private data
 __isset ($name)
 save_config ($db)
 saves all content of the config into the database
 load_config ($db, $user)
 loads config from the database
 load_info ($au, $user)
 loads user infos from auth object
 load_info_ID ($au, $user)
 loads user infos from auth object

Private Attributes

 $config = array()
 this array holds all the configurations. those which are serialized to "config" and those which are stored separately
 $ID
 user's ID , should be numerical
 $fullName
 user's full name
 $givenName
 user's givenname
 $surName
 user's surname
 $name
 user's username
 $group
 user's primary group
 $groupName
 name of the user's primary group
 $is_auth = false
 boolean true if the user is authentificated (logged in)

Detailed Description

user object holding infos about he user and his configs. Intended to be serialized into the $_SESSION variable

Definition at line 89 of file user.class.php.

Member Function Documentation

__get (   $name)

php's magic method for getting private data

Definition at line 157 of file user.class.php.

__isset (   $name)

Definition at line 177 of file user.class.php.

__set (   $name,
  $value 
)

php's magic method for setting private data

Definition at line 130 of file user.class.php.

check_config (   $name,
  $value 
)

checks if a value can be set as specific config variable

Parameters
string$namevariable name
mixed$valuethe value we want check

Implements iUser.

Definition at line 107 of file user.class.php.

get_config (   $name)

gets a config variable

Parameters
string$namevariable name
Returns
mixed the configuration

Implements iUser.

Definition at line 117 of file user.class.php.

load_config (   $db,
  $user 
)

loads config from the database

Parameters
db$dbdatabase object
string$userthe username we want load

Implements iUser.

Definition at line 209 of file user.class.php.

load_info (   $au,
  $user 
)

loads user infos from auth object

Parameters
auth$auauthentification object
string$userthe username we want load

Implements iUser.

Definition at line 221 of file user.class.php.

load_info_ID (   $au,
  $user 
)

loads user infos from auth object

Parameters
auth$auauthentification object
string$useruser numerical ID

Implements iUser.

Definition at line 229 of file user.class.php.

save_config (   $db)

saves all content of the config into the database

Parameters
db$dbdatabase object
Returns
bool true on succes, false if one database call went wrong

Implements iUser.

Definition at line 197 of file user.class.php.

set_config (   $name,
  $value 
)

sets a config variable

Parameters
string$namevariable name
mixed$valuethe value we want set

Implements iUser.

Definition at line 101 of file user.class.php.

Field Documentation

$config = array()
private

this array holds all the configurations. those which are serialized to "config" and those which are stored separately

Definition at line 90 of file user.class.php.

$fullName
private

user's full name

Definition at line 93 of file user.class.php.

$givenName
private

user's givenname

Definition at line 94 of file user.class.php.

$group
private

user's primary group

Definition at line 97 of file user.class.php.

$groupName
private

name of the user's primary group

Definition at line 98 of file user.class.php.

$ID
private

user's ID , should be numerical

Definition at line 92 of file user.class.php.

$is_auth = false
private

boolean true if the user is authentificated (logged in)

Definition at line 99 of file user.class.php.

$name
private

user's username

Definition at line 96 of file user.class.php.

$surName
private

user's surname

Definition at line 95 of file user.class.php.


The documentation for this class was generated from the following file: