public function validate_session($user) { // Check if PASSAGE_AUTH_USER is set and handle this case if ($passage_auth_user = get_apache_header($this->config['passage_login'])) { // todo: a virer de la car a chaque request check groups $this->syncgroups(); return $passage_auth_user === $user['username'] ? true : false; } // PASSAGE_AUTH_USER is not set. A valid session is now determined by the user type (anonymous/bot or not) if ($user['user_type'] == USER_IGNORE) { return true; } return false; }
public function validate_session($user) { // Check if PHP_AUTH_USER is set and handle this case if (get_apache_header($this->config['passage_login'])) { $php_auth_user = get_apache_header($this->config['passage_login']); return ($php_auth_user === $user['username']) ? true : false; } // PHP_AUTH_USER is not set. A valid session is now determined by the user type (anonymous/bot or not) if ($user['user_type'] == USER_IGNORE) { return true; } return false; }