user Class Reference

represents a user known by the wiki More...

List of all members.

Public Member Functions

 user ($id, $login, $password, $admin, $first_name, $last_name, $email, $lang, $ui_lang, $timestamp)
 setWatches ($watches)
 isWatching ($node_id)
 has user subscribed to this node
 isAdmin ()
 is user an admin
 isModerator ()
 is user a moderator
 isAnonymous ()
 is user anonymous or not

Public Attributes

 $id
 database id
 $login
 login
 $password
 md5 encoded password
 $admin
 admin level (0=user, 1=moderator, 2=admin as defined in constants.lib.php)
 $first_name
 first name
 $last_name
 last name
 $email
 email
 $lang
 lang content
 $ui_lang
 ui lang code (i18n)
 $timestamp
 timestamp of creation
 $watches
 array<node_id> list of nodes subscribed


Detailed Description

represents a user known by the wiki


Member Function Documentation

user::isAdmin (  ) 

is user an admin

an admin should be considered a moderator, but isModerator() below will return false as the comparison is not intelligent (only database values are compared)

Returns:
true if user is admin, false otherwise

user::isAnonymous (  ) 

is user anonymous or not

there is always a user object defined in our world if there is no user logged in, method createAnonymousUser is called on wiki and we can later see if our current user is logged in or not via this method

Returns:
true if user is anonymous, false if he is logged in

user::isModerator (  ) 

is user a moderator

Returns:
true if user is moderator, false otherwise

user::isWatching ( node_id  ) 

has user subscribed to this node

Parameters:
node_id database id of node to look at
Returns:
true if user has subscribed, false otherwise


Member Data Documentation

user::$admin

admin level (0=user, 1=moderator, 2=admin as defined in constants.lib.php)

user::$email

email

user::$first_name

first name

user::$id

database id

user::$lang

lang content

user::$last_name

last name

user::$login

login

user::$password

md5 encoded password

user::$timestamp

timestamp of creation

user::$ui_lang

ui lang code (i18n)

user::$watches

array<node_id> list of nodes subscribed


The documentation for this class was generated from the following file:
Generated on Mon Feb 19 19:11:58 2007 for Wiclear by  doxygen 1.4.7