Ejemplo n.º 1
0
 /**
  * Read the configuration
  */
 public function __construct($auth)
 {
     $this->_cookie_id .= $GLOBALS['midcom_config']['auth_backend_simple_cookie_id'];
     $this->_cookie_path = $GLOBALS['midcom_config']['auth_backend_simple_cookie_path'];
     if ($this->_cookie_path == 'auto') {
         $this->_cookie_path = midcom_connection::get_url('self');
     }
     if (!empty($_SERVER['HTTPS']) && $GLOBALS['midcom_config']['auth_backend_simple_cookie_secure']) {
         $this->_secure_cookie = true;
     }
     parent::__construct($auth);
 }
Ejemplo n.º 2
0
 /**
  * This is a limited version of logout: It will just drop the current login session, but keep
  * the current request authenticated.
  *
  * Note, that this call will also drop any information in the PHP Session (if exists). This will
  * leave the request in a clean state after calling this function.
  */
 function drop_login_session()
 {
     if (is_null($this->_auth_backend->user)) {
         debug_add('The backend has no authenticated user set, so we should be fine, doing the relocate nevertheless though.');
     } else {
         $this->_auth_backend->logout();
     }
     // Kill the session forcibly:
     @session_start();
     $_SESSION = array();
     session_destroy();
 }