$this->log("Init Utils", 4);
+ $this->log("__construct[1]: user ".var_export($this->settings['user'], true), 3);
$this->startSession();
+ $this->log("__construct[2]: user ".var_export($this->settings['user'], true), 3);
if (! isset($_SESSION['settings'])) {
$this->initSettings();
}
+ $this->log("__construct[3]: user ".var_export($this->settings['user'], true), 3);
$this->settings = $_SESSION['settings'];
+ $this->log("__construct[4]: user ".var_export($this->settings['user'], true), 3);
if ($CFG->auth_method == 'HTTP_AUTH') {
- if (isset($this->server['PHP_AUTH_USER'])) {
- $this->settings['user'] = $this->server['PHP_AUTH_USER'];
+ if (isset($_SERVER['PHP_AUTH_USER'])) {
+ $this->settings['user'] = $_SERVER['PHP_AUTH_USER'];
$this->settings['loginStatus'] = 'OK';
if ($CFG->admin_user == $this->settings['user'])
$this->settings['admin'] = true;
}
$this->settings = array(
- 'server' => $_SERVER,
'user' => null,
'admin' => false,
'loginStatus' => 'Not logged in',
global $CFG;
$loggedIn = false;
- $this->log("isLoggedIn[1]\n".var_export($this->settings, true), 3);
+ $this->log("isLoggedIn[1]: user ".var_export($this->settings['user'], true), 3);
if ('' == session_id()) {
$this->startSession();
}
- $this->log("isLoggedIn[2]\n".var_export($this->settings, true), 3);
+ $this->log("isLoggedIn[2]: user ".var_export($this->settings['user'], true), 3);
$this->checkSession();
- $this->log("isLoggedIn[3]\n".var_export($this->settings, true), 3);
+ $this->log("isLoggedIn[3]: user ".var_export($this->settings['user'], true), 3);
if (isset($this->settings['user'])) {
if ($this->settings['user'] != null) {
$loggedIn = true;
} else {
if ($CFG->auth_method == 'HTTP_AUTH') {
- if (isset($this->server['PHP_AUTH_USER'])) {
- $this->settings['user'] = $this->server['PHP_AUTH_USER'];
+ if (isset($_SERVER['PHP_AUTH_USER'])) {
+ $this->settings['user'] = $_SERVER['PHP_AUTH_USER'];
$loggedIn = true;
}
}