
Public Member Functions | |
| setNewUserData ($my) | |
| logout () | |
Static Public Member Functions | |
| static | getInstance () |
Public Attributes | |
| $isadmin = 0 | |
Protected Member Functions | |
| __construct () | |
| forceLogout ($exp) | |
Protected Attributes | |
| $_prefix = 'user' | |
Definition at line 265 of file aliroSession.php.
| aliroUserSession::__construct | ( | ) | [protected] |
Reimplemented from aliroSession.
Definition at line 269 of file aliroSession.php.
References aliroCore::getInstance().
00269 { 00270 parent::__construct(); 00271 $this->_lifetime = max (aliroCore::getInstance()->getCfg('lifetime'), 300); 00272 }
| static aliroUserSession::getInstance | ( | ) | [static] |
Definition at line 274 of file aliroSession.php.
References aliroSession::checkValidSession().
Referenced by aliroSessionFactory::getSession().
00274 { 00275 if (!is_object(self::$currentSession)) { 00276 self::$currentSession = new aliroUserSession(); 00277 if (!self::$currentSession->checkValidSession()) { 00278 // Must be a new visitor 00279 self::$currentSession->setNew(); 00280 $_SESSION = array(); 00281 self::$currentSession->setNewUserData(new mosUser()); 00282 $_SESSION['aliro_user_session_start'] = @date('Y-M-d H:i:s'); 00283 } 00284 } 00285 return self::$currentSession; 00286 }
| aliroUserSession::forceLogout | ( | $ | exp | ) | [protected] |
Reimplemented from aliroSession.
Definition at line 288 of file aliroSession.php.
References aliroMambotHandler::getInstance().
00288 { 00289 if ($exp->username) { 00290 $loginfo = new aliroLoginDetails($exp->username); 00291 aliroMambotHandler::getInstance()->trigger('expireLogout', array($loginfo)); 00292 } 00293 }
| aliroUserSession::setNewUserData | ( | $ | my | ) |
Definition at line 295 of file aliroSession.php.
References aliroCoreDatabase::getInstance(), and aliroSession::setSessionData().
Referenced by logout().
00295 { 00296 if ($this->session_id) aliroCoreDatabase::getInstance()->doSQL("DELETE FROM #__session WHERE session_id = '$this->session_id' AND isadmin = $this->isadmin"); 00297 $this->setSessionData($my); 00298 }
| aliroUserSession::logout | ( | ) |
Definition at line 300 of file aliroSession.php.
References $_REQUEST, aliroRequest::getInstance(), and setNewUserData().
00300 { 00301 $my = new mosUser(); 00302 $stamp = $_SESSION['aliro_user_session_start']; 00303 $redirect = isset($_SESSION['aliro_redirect_here']) ? $_SESSION['aliro_redirect_here'] : ''; 00304 $_SESSION = array(); 00305 $_SESSION['aliro_user_session_start'] = $stamp; 00306 $this->setNewUserData($my); 00307 $request = aliroRequest::getInstance(); 00308 if ($return = $request->getParam($_REQUEST, 'return')) $request->redirect($return); 00309 else $request->redirect ($redirect); 00310 }
aliroUserSession::$_prefix = 'user' [protected] |
Definition at line 266 of file aliroSession.php.
| aliroUserSession::$isadmin = 0 |
Definition at line 267 of file aliroSession.php.
1.5.5