Main Page | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Class Members | File Members | Related Pages

User Class Reference

List of all members.

Detailed Description

Author:
Carsten Bormann <jisuga@terta.kn-bremen.de>

Robert Vock <smir@andaloria.de>

Definition at line 22 of file user.php.

Public Member Functions

 User (&$oDB, &$oLog, &$aAdmin, $aAdminArrays, $strCookie)
 constructor.
 checklogin ()
 check for correct login
 login ($strLoginName, $strPass)
 try to login with user values
 logout ()
 logout user
 isAdmin ($strRight)
 determines if user has admin rights
 check ($x, $y)
 check if the user has access to the field
 giveRight ($strRight)
 gives the user a right
 _clearUser ()
 set default values
 _setUser ($aRow)
 set users values out of DB-Line (except username and password)

Public Attributes

 $oDB
 DB object.
 $oLog
 Log object.
 $aAdmin
 array with
 $aAdminArrays
 array with names of sql right fields
 $aRights
 integer array with userrights
 $intUserID
 $strUser
 username
 $strPasswd
 password
 $booLoggedIn
 Login-Status.
 $cookie_name
 Cookie-Name.
 $intHomeX
 $intHomeY
 $intLastX
 $intLastY
 $intZoom
 $intSizeX
 $intSizeY
 $intFog
 1 = show fog of war
 $intDruidFill
 1 = fill druidhort view
 $intDruidBorder
 1 = draw border for druidhort view
 $intUnit
 $intPlayer
 player id of this user
 $aTowns
 $intLimitView


Constructor & Destructor Documentation

User::User &$  oDB,
&$  oLog,
&$  aAdmin,
aAdminArrays,
strCookie
 

constructor.

set the objects

Parameters:
$oDB reference to database object
$oLog reference to logger object
$aAdmin an array with information about the admin rights, defined in adminconfig.php
$aAdminArrays an array defining where to find which adminright, defined in adminconfig.php
$strCookie name of cookie

Definition at line 58 of file user.php.

References $aAdmin, $aAdminArrays, $oDB, $oLog, and _clearUser().


Member Function Documentation

User::_clearUser  ) 
 

set default values

Definition at line 260 of file user.php.

References intHomeX, intHomeY, intLastX, intLastY, and intZoom.

Referenced by User().

User::_setUser aRow  ) 
 

set users values out of DB-Line (except username and password)

Parameters:
$aRow array with user record

Definition at line 286 of file user.php.

References $aRow, $sqlResult, intHomeX, intHomeY, intLastX, intLastY, and intZoom.

Referenced by checklogin().

User::check x,
y
 

check if the user has access to the field

Parameters:
$x x-coord of the field
$y y-coord of the field
Returns:
bool

Definition at line 211 of file user.php.

References $aTown, $x, $y, intHomeX, and intHomeY.

User::checklogin  ) 
 

check for correct login

Returns:
true = correct login

Definition at line 73 of file user.php.

References $_COOKIE, $aRow, _setUser(), login(), and logout().

User::giveRight strRight  ) 
 

gives the user a right

Parameters:
$strRight name of the right

Definition at line 245 of file user.php.

User::isAdmin strRight  ) 
 

determines if user has admin rights

Parameters:
$strRight name of the right
Returns:
bool

Definition at line 192 of file user.php.

User::login strLoginName,
strPass
 

try to login with user values

Parameters:
$strLoginName case insensitive loginname
$strPass password
Returns:
true = correct login

Definition at line 145 of file user.php.

References $aRow.

Referenced by checklogin().

User::logout  ) 
 

logout user

Definition at line 179 of file user.php.

Referenced by checklogin().


Member Data Documentation

User::$aAdmin
 

array with

Definition at line 26 of file user.php.

Referenced by User().

User::$aAdminArrays
 

array with names of sql right fields

Definition at line 27 of file user.php.

Referenced by User().

User::$aRights
 

integer array with userrights

Definition at line 28 of file user.php.

User::$aTowns
 

Definition at line 46 of file user.php.

User::$booLoggedIn
 

Login-Status.

Definition at line 32 of file user.php.

User::$cookie_name
 

Cookie-Name.

Definition at line 33 of file user.php.

User::$intDruidBorder
 

1 = draw border for druidhort view

Definition at line 43 of file user.php.

User::$intDruidFill
 

1 = fill druidhort view

Definition at line 42 of file user.php.

User::$intFog
 

1 = show fog of war

Definition at line 41 of file user.php.

User::$intHomeX
 

Definition at line 34 of file user.php.

User::$intHomeY
 

Definition at line 35 of file user.php.

User::$intLastX
 

Definition at line 36 of file user.php.

User::$intLastY
 

Definition at line 37 of file user.php.

User::$intLimitView
 

Definition at line 47 of file user.php.

User::$intPlayer
 

player id of this user

Definition at line 45 of file user.php.

User::$intSizeX
 

Definition at line 39 of file user.php.

User::$intSizeY
 

Definition at line 40 of file user.php.

User::$intUnit
 

Definition at line 44 of file user.php.

User::$intUserID
 

Definition at line 29 of file user.php.

User::$intZoom
 

Definition at line 38 of file user.php.

User::$oDB
 

DB object.

Definition at line 24 of file user.php.

Referenced by User().

User::$oLog
 

Log object.

Definition at line 25 of file user.php.

Referenced by User().

User::$strPasswd
 

password

Definition at line 31 of file user.php.

User::$strUser
 

username

Definition at line 30 of file user.php.


The documentation for this class was generated from the following file:
Generated on Sun May 8 19:29:46 2005 for PhpMap by  doxygen 1.4.2