MagicSmoke  $VERSION$
Session Class Reference

The session class. More...

Inheritance diagram for Session:
DummyWebSession

Public Member Functions

 __construct ($trans)
 construct the session object, check validity More...
 
 canExecute ($transaction)
 checks whether user can execute this transaction, returns true on success; it always returns true for admins More...
 
 checkFlags ($iflg)
 checks the given flags item pattern (string or array of strings) and returns true if they match More...
 
 deleteSession ()
 delete current session More...
 
 getFlags ()
 returns the flags of this user More...
 
 getRights ()
 returns all rights of this user More...
 
 getRoles ()
 returns all roles of this user More...
 
 getUser ()
 returns the user name of the session More...
 
 hasFlag ($f)
 returns whether the user has a specific flag More...
 
 isAuthenticated ()
 returns true if the session is actually authenticated More...
 
 isValid ()
 returns true if the session exists, it may still be temporary and unauthenticated More...
 
 setMyPasswd ($trans)
 set my own password; called from SetMyPasswd transaction More...
 

Static Public Member Functions

static currentUserName ()
 return the name of the currently logged in user More...
 
static initialize ()
 initialize session sub-system More...
 
static instance ()
 return the session instance More...
 
static login ($trans)
 creates a new session, called from the Login transaction More...
 
static passwdHash ($passwd)
 helper function to generate salted user or customer password hash More...
 
static passwdVerify ($passwd, $hash)
 helper function to verify user or customer login More...
 
static setWebSession ()
 initialize system in web session mode (ie. More...
 

Protected Member Functions

 initRights ()
 internal: retrieve and remember the rights, roles, and flags of this user More...
 

Protected Attributes

 $flags =array()
 
 $rights =array()
 
 $roles =array()
 
 $sessid =""
 
 $user =""
 

Detailed Description

The session class.

Constructor & Destructor Documentation

Session::__construct (   $trans)

construct the session object, check validity

References $db, and initRights().

Member Function Documentation

Session::canExecute (   $transaction)

checks whether user can execute this transaction, returns true on success; it always returns true for admins

References $db.

Session::checkFlags (   $iflg)

checks the given flags item pattern (string or array of strings) and returns true if they match

References hasFlag().

static Session::currentUserName ( )
static
Session::deleteSession ( )

delete current session

References $db.

Session::getFlags ( )

returns the flags of this user

References $flags.

Session::getRights ( )

returns all rights of this user

References $rights.

Session::getRoles ( )

returns all roles of this user

References $roles.

Session::getUser ( )

returns the user name of the session

References $user.

Session::hasFlag (   $f)

returns whether the user has a specific flag

Referenced by checkFlags().

static Session::initialize ( )
static

initialize session sub-system

References $db.

Session::initRights ( )
protected

internal: retrieve and remember the rights, roles, and flags of this user

References $db, and $i.

Referenced by __construct(), and DummyWebSession\__construct().

Session::isAuthenticated ( )

returns true if the session is actually authenticated

Session::isValid ( )

returns true if the session exists, it may still be temporary and unauthenticated

static Session::login (   $trans)
static

creates a new session, called from the Login transaction

References $ClientSessionTimeout, $db, getRandom(), and translate().

Referenced by WTrLogin\handleRequest().

static Session::passwdHash (   $passwd)
static

helper function to generate salted user or customer password hash

Parameters
$passwdunhashed password
Returns
the salted password hash

References getSalt().

Referenced by WOCustomer\registerCustomer(), and WOCustomer\resetLoginPage().

static Session::passwdVerify (   $passwd,
  $hash 
)
static

helper function to verify user or customer login

Parameters
$passwdunhashed password
$hashsalted password hash
Returns
true on success, false on error or if the password does not match

Referenced by WOCustomer\checkLogin().

Session::setMyPasswd (   $trans)

set my own password; called from SetMyPasswd transaction

References $db, and tr().

static Session::setWebSession ( )
static

initialize system in web session mode (ie.

some user called the web page in a browser)

Member Data Documentation

Session::$flags =array()
protected

Referenced by getFlags().

Session::$rights =array()
protected

Referenced by getRights().

Session::$roles =array()
protected

Referenced by getRoles().

Session::$sessid =""
protected
Session::$user =""
protected

Referenced by getUser().


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