3 public static function behavior_initWidgets(&$w) {
4 $w->create('XorgAuth', __('Auth. X.org'), array('xorgAuthWidget', 'widget'));
7 static public function widget(&$w) {
9 $name = $core->auth
->userID();
11 $str = '<p>Tu es ' . $core->auth
->getInfo('user_displayname') . '<br />';
12 if ($core->auth
->check('usage,contentadmin,admin', $core->blog
->id
)) {
13 $str .= '<a href="' . $core->blog
->url
. 'admin/index.php">Interface de rédaction</a><br />';
15 return $str . '<a href="' . $core->blog
->url
. 'auth/exit">Déconnexion</a></p>';
17 return '<p><a href="' . $core->blog
->url
. 'auth/Xorg?path=' . $_SERVER['PATH_INFO'] . '">M\'authentifier via Polytechnique.org</a></p>';