Port X.org session management to the new session format.
[platal.git] / modules / platal.php
index 2a57123..2dd4e08 100644 (file)
@@ -410,13 +410,13 @@ Adresse de secours : " . Post::v('email') : ""));
 
     function handler_exit(&$page, $level = null)
     {
+        global $session;
         if (S::has('suid')) {
             $a4l  = S::v('forlife');
             $suid = S::v('suid');
             $log  = S::v('log');
             $log->log("suid_stop", S::v('forlife') . " by " . $suid['forlife']);
-            $_SESSION = $suid;
-            S::kill('suid');
+            $session->stopSUID();
             pl_redirect('admin/user/' . $a4l);
         }
 
@@ -438,8 +438,7 @@ Adresse de secours : " . Post::v('email') : ""));
             $ref = isset($_SERVER['HTTP_REFERER']) ? $_SERVER['HTTP_REFERER'] : '';
             $_SESSION['log']->log('deconnexion',$ref);
         }
-
-        XorgSession::destroy();
+        $session->destroy();
 
         if (Get::has('redirect')) {
             http_redirect(rawurldecode(Get::v('redirect')));