Campustream 1.0
A social network MQP for WPI
sess Class Reference

Static Public Member Functions

static getUser ()
static getUsername ()
static getUserID ()
static isActiveUser (User_Model $user)
static is_logged_in ()
static require_login ()

Detailed Description

Shortcuts to work with the current session object

Definition at line 6 of file sess.php.


Member Function Documentation

static getUser ( ) [static]

Get the currently active User_Model

Definition at line 11 of file sess.php.

static getUserID ( ) [static]

Get the ID of the active user

Definition at line 25 of file sess.php.

static getUsername ( ) [static]

Get the username of the active user

Definition at line 18 of file sess.php.

static is_logged_in ( ) [static]

Is the current user logged in?

Definition at line 41 of file sess.php.

static isActiveUser ( User_Model user) [static]

Is the given user the same as the active user?

Parameters:
$userThe user to compare to the active user

Definition at line 34 of file sess.php.

static require_login ( ) [static]

Helper function to require a user to login. Redirects to the login page if they are not.

Definition at line 53 of file sess.php.


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