Fix issues with dotclear session management and browser cache.
[dotclear.git] / widget.auth.php
1 <?php
2 class xorgAuthWidget {
3 public static function behavior_initWidgets(&$w) {
4 $w->create('XorgAuth', __('Auth. X.org'), array('xorgAuthWidget', 'widget'));
5 }
6
7 static public function widget(&$w) {
8 global $core;
9 $name = $core->auth->userID();
10 var_dump($_SESSION);
11 var_dump($_REQUEST);
12 echo "sessionid = " . session_id();
13 if ($name) {
14 return '<p>Tu es ' . $core->auth->getInfo('user_displayname') . '<br />'
15 . '<a href="' . $core->blog->url . 'auth/exit">déconnexion</a></p>';
16 } else {
17 return '<p><a href="' . $core->blog->url . 'auth/Xorg?path=' . $_SERVER['REQUEST_URI'] . '">M\'authentifier via Polytechnique.org</a></p>';
18 }
19 }
20 }
21
22 ?>