
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 238 of file aliroSession.php.
| aliroUserSession::__construct | ( | ) | [protected] |
Reimplemented from aliroSession.
Definition at line 242 of file aliroSession.php.
References aliroCore::getInstance().
00242 { 00243 parent::__construct(); 00244 $this->_lifetime = max (aliroCore::getInstance()->getCfg('lifetime'), 300); 00245 }
| static aliroUserSession::getInstance | ( | ) | [static] |
Definition at line 247 of file aliroSession.php.
References aliroSession::checkValidSession().
Referenced by aliroSessionFactory::getSession().
00247 { 00248 if (!is_object(self::$currentSession)) { 00249 self::$currentSession = new aliroUserSession(); 00250 if (!self::$currentSession->checkValidSession()) { 00251 // Must be a new visitor 00252 self::$currentSession->setNew(); 00253 $_SESSION = array(); 00254 self::$currentSession->setNewUserData(new mosUser()); 00255 $_SESSION['aliro_user_session_start'] = @date('Y-M-d H:i:s'); 00256 } 00257 } 00258 return self::$currentSession; 00259 }
| aliroUserSession::forceLogout | ( | $ | exp | ) | [protected] |
Reimplemented from aliroSession.
Definition at line 261 of file aliroSession.php.
References aliroMambotHandler::getInstance().
00261 { 00262 if ($exp->username) { 00263 $loginfo = new aliroLoginDetails($exp->username); 00264 aliroMambotHandler::getInstance()->trigger('expireLogout', array($loginfo)); 00265 } 00266 }
| aliroUserSession::setNewUserData | ( | $ | my | ) |
Definition at line 268 of file aliroSession.php.
References aliroCoreDatabase::getInstance(), and aliroSession::setSessionData().
Referenced by logout().
00268 { 00269 if ($this->session_id) aliroCoreDatabase::getInstance()->doSQL("DELETE FROM #__session WHERE session_id = '$this->session_id' AND isadmin = $this->isadmin"); 00270 $this->setSessionData($my); 00271 }
| aliroUserSession::logout | ( | ) |
Definition at line 273 of file aliroSession.php.
References $_REQUEST, aliroRequest::getInstance(), and setNewUserData().
00273 { 00274 $my = new mosUser(); 00275 $stamp = $_SESSION['aliro_user_session_start']; 00276 $redirect = isset($_SESSION['aliro_redirect_here']) ? $_SESSION['aliro_redirect_here'] : ''; 00277 $_SESSION = array(); 00278 $_SESSION['aliro_user_session_start'] = $stamp; 00279 $this->setNewUserData($my); 00280 $request = aliroRequest::getInstance(); 00281 if ($return = $request->getParam($_REQUEST, 'return')) $request->redirect($return); 00282 else $request->redirect ($redirect); 00283 }
aliroUserSession::$_prefix = 'user' [protected] |
Definition at line 239 of file aliroSession.php.
| aliroUserSession::$isadmin = 0 |
Definition at line 240 of file aliroSession.php.
1.5.5