<?php
/***************************************************************************
- * Copyright (C) 2003-2008 Polytechnique.org *
+ * Copyright (C) 2003-2010 Polytechnique.org *
* http://opensource.polytechnique.org/ *
* *
* This program is free software; you can redistribute it and/or modify *
*/
public function start($level)
{
- $backup = S::i($level);
if ($this->checkAuth($level)) {
return true;
}
*/
public function startSUID($user, $perms = null)
{
- if (S::has('suid')) {
+ if (S::suid()) {
return false;
}
- $backup = $_SESSION;
- $_SESSION = array();
+ $backup = S::changeSession(array());
$this->fillSession();
S::set('suid', $backup);
if (!$this->startSessionAs($user, AUTH_SUID)) {
*/
public function stopSUID()
{
- if (!S::has('suid')) {
+ if (!S::suid()) {
return false;
}
- $_SESSION = $_SESSION['suid'];
+ S::changeSession(S::v('suid'));
return true;
}