C# Class PERMWebSolution.Models.SessionManager

Session management class
Show file Open project: VK-EIF/PERM-WEB-SOURCE Class Usage Examples

Public Methods

Method Description
SessionManager ( int uID ) : System

Constructor

SessionManager ( string sessionID ) : System

Oveloaded constructor accepts sessionID

checkSession ( ) : bool

checks if user session is active

getUserSession ( ) : string

Returns session if user is regitered

Private Methods

Method Description
createSession ( ) : bool

Saves session to the session table

deleteOldSessions ( ) : void

Deletes old sessions

deleteOldUserSession ( ) : void

Deletes old sessions

Method Details

SessionManager() public method

Constructor
public SessionManager ( int uID ) : System
uID int User ID
return System

SessionManager() public method

Oveloaded constructor accepts sessionID
public SessionManager ( string sessionID ) : System
sessionID string String sessionID
return System

checkSession() public method

checks if user session is active
public checkSession ( ) : bool
return bool

getUserSession() public method

Returns session if user is regitered
public getUserSession ( ) : string
return string