public function logout() { $userProfileNamespace = new Zend_Session_Namespace('sesion'); $userProfileNamespace->unLock(); $log = new Application_Model_Logs(); $log->crearLog('B'); Zend_Session::destroy(true); }
/** * Defined by spl ArrayObject. * Here we are redefining the action to point to the session namespace * * @param string $index * @return bool */ public function offsetSet($index, $newval) { if (self::$_session->isLocked()) { self::$_session->unLock(); } self::getSession()->{$index} = $newval; self::$_session->lock(); }
define('IN_QOOL', true); error_reporting(E_ERROR); //read the directory structure require_once "simple_fn.php"; //check if the cms is installed if (!($dirs = readDirFile())) { include "install/install.php"; $installer = new QoolInstaller(); $installer->start(); } else { setIncludePath($dirs); //d(get_include_path()); require_once "Zend/Session.php"; $namespace = new Zend_Session_Namespace('Qool'); if ($namespace->isLocked()) { $namespace->unLock(); } //get the folder if needed amiInAfolder($dirs); //if the user is not logged in we just set some typical rights givemeGuestRights(); //set the include path //now read configuration require_once "Zend/Config/Xml.php"; $config = new Zend_Config_Xml('config/config.xml'); //just a simple definition to make things readable define('DIR_SEP', $config->host->separator); define('APPL_PATH', $config->host->absolute_path); $_SESSION['SITE_URL'] = $config->host->http . $config->host->subdomain . $config->host->domain . $config->host->folder; //read the database table names and prefix $database = new Zend_Config_Xml('config' . DIR_SEP . 'database.xml');