Use symbolic AUTH_SUID to identify SUID auth level.
authorFlorent Bruneau <florent.bruneau@polytechnique.org>
Sun, 7 Dec 2008 11:19:55 +0000 (12:19 +0100)
committerFlorent Bruneau <florent.bruneau@polytechnique.org>
Sun, 7 Dec 2008 11:19:55 +0000 (12:19 +0100)
Signed-off-by: Florent Bruneau <florent.bruneau@polytechnique.org>
classes/plsession.php

index bc5f508..688f5f5 100644 (file)
@@ -23,6 +23,7 @@
  * Only AUTH_PUBLIC is mandatory. The others are defined as useful values,
  * but can be overwritten by others auth levels definitions.
  */
+define('AUTH_SUID',   -1);
 define('AUTH_PUBLIC', 0);
 define('AUTH_COOKIE', 5);
 define('AUTH_MDP',    10);
@@ -184,7 +185,7 @@ abstract class PlSession
         $_SESSION = array();
         $this->fillSession();
         S::set('suid', $backup);
-        if (!$this->startSessionAs($user, -1)) {
+        if (!$this->startSessionAs($user, AUTH_SUID)) {
             $this->stopSUID();
             return false;
         }