Class session

Description

Class contains contains methods for setting sessions

Located in /lib/session.php (line 14)


	
			
Method Summary
static boolean checkAccessControl (string $allow, [ $setErrorModule = true])
static void checkSystemCookie ()
static string getActionMessage ()
static int getSessionTime ()
static void getSystemCookie ()
static boolean getUserId ()
static void getUserLevel ()
static void initSession ()
static boolean isAdmin ()
static boolean isInSession ()
static boolean isSuper ()
static boolean isUser ()
static void killSession ()
static void setActionMessage (string $message)
static void setSystemCookie ( $account_id)
Methods
static checkAccessControl (line 290)

checkAccessControl($allow)

checks user level: super has access to all, admin has access to more user has access to less null has access to least

  • return: true if user has required accessLevel. false if not.
  • access: public
static boolean checkAccessControl (string $allow, [ $setErrorModule = true])
  • string $allow: user or admin or super
  • $setErrorModule
static checkSystemCookie (line 65)
  • access: public
static void checkSystemCookie ()
static getActionMessage (line 190)

method for reading an action message

  • return: current set actionMessage
  • access: public
static string getActionMessage ()
static getSessionTime (line 161)

method for getting how long user has been in session

  • return: secs in session
  • access: public
static int getSessionTime ()
static getSystemCookie (line 126)
  • access: public
static void getSystemCookie ()
static getUserId (line 268)

checks $_SESSION['id'] and if set it will return method for getting a users id

  • return: true or false
  • access: public
static boolean getUserId ()
static getUserLevel (line 234)

method for getting users level (null, user, admin, super) return mixed null or string if null then user is not logged in if string we get the users highest level, user, admin or super.

  • access: public
static void getUserLevel ()
static initSession (line 20)

method for initing a session

set in_session and start_time of session

  • access: public
static void initSession ()
static isAdmin (line 220)

method for testing if user is admin or not

  • return: true or false
  • access: public
static boolean isAdmin ()
static isInSession (line 145)

method for testing if user is in session or not

  • return: true or false
  • access: public
static boolean isInSession ()
static isSuper (line 206)

method for testing if user is in super or not

  • return: true or false
  • access: public
static boolean isSuper ()
static isUser (line 253)

method for testing if user is loged in or not

  • return: true or false
  • access: public
static boolean isUser ()
static killSession (line 134)
  • access: public
static void killSession ()
static setActionMessage (line 177)

method for setting an action message. Used when we want to tell a user what happened if she is redirected

  • access: public
static void setActionMessage (string $message)
  • string $message: the action message.
static setSystemCookie (line 101)
  • access: public
static void setSystemCookie ( $account_id)
  • $account_id

Documentation generated on Fri, 17 Dec 2010 17:56:37 +0100 by phpDocumentor 1.4.3