Commit | Line | Data |
---|---|---|
b519995b FB |
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 | if ($name) { | |
11 | return '<p>Tu es ' . $core->auth->getInfo('user_displayname') . '<br />' | |
12 | . '<a href="' . $core->blog->url . 'auth/exit">déconnexion</a></p>'; | |
13 | } else { | |
14 | return '<p><a href="' . $core->blog->url . 'auth/Xorg?path=' . $_SERVER['REQUEST_URI'] . '">M\'authentifier via Polytechnique.org</a></p>'; | |
15 | } | |
16 | } | |
17 | } | |
18 | ||
19 | ?> |